[PATCH 2/4] ads7846: put it into the 'dispaly' category

Gan Qixin posted 4 patches 5 years ago
Maintainers: Peter Maydell <peter.maydell@linaro.org>, Kevin Wolf <kwolf@redhat.com>, Andrzej Zaborowski <balrogg@gmail.com>, Max Reitz <mreitz@redhat.com>
There is a newer version of this series
[PATCH 2/4] ads7846: put it into the 'dispaly' category
Posted by Gan Qixin 5 years ago
The category of the ads7846 device is not set, put it into the 'dispaly' category.

Signed-off-by: Gan Qixin <ganqixin@huawei.com>
---
 hw/display/ads7846.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/hw/display/ads7846.c b/hw/display/ads7846.c
index 023165b2a3..b455cb5acd 100644
--- a/hw/display/ads7846.c
+++ b/hw/display/ads7846.c
@@ -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_DISPLAY, dc->categories);
 }
 
 static const TypeInfo ads7846_info = {
-- 
2.23.0