ads7846: put it into the 'input' category
authorGan Qixin <ganqixin@huawei.com>
Thu, 12 Nov 2020 12:58:22 +0000 (20:58 +0800)
committerThomas Huth <thuth@redhat.com>
Tue, 17 Nov 2020 09:17:02 +0000 (10:17 +0100)
The category of the ads7846 device is not set, put it into the 'input'
category.

Signed-off-by: Gan Qixin <ganqixin@huawei.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20201112125824.763182-3-ganqixin@huawei.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
hw/display/ads7846.c

index 023165b2a32f84681720743b98c54d8828ee6f81..cb3a431cfd006475f83a8df2a769258e2f0b0966 100644 (file)
@@ -163,10 +163,12 @@ static void ads7846_realize(SSISlave *d, Error **errp)
 
 static void ads7846_class_init(ObjectClass *klass, void *data)
 {
+    DeviceClass *dc = DEVICE_CLASS(klass);
     SSISlaveClass *k = SSI_SLAVE_CLASS(klass);
 
     k->realize = ads7846_realize;
     k->transfer = ads7846_transfer;
+    set_bit(DEVICE_CATEGORY_INPUT, dc->categories);
 }
 
 static const TypeInfo ads7846_info = {