diff options
Diffstat (limited to 'hw/ads7846.c')
-rw-r--r-- | hw/ads7846.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/hw/ads7846.c b/hw/ads7846.c index de3f7af127..c1b894e13a 100644 --- a/hw/ads7846.c +++ b/hw/ads7846.c @@ -153,11 +153,18 @@ static int ads7846_init(SSISlave *dev) return 0; } -static SSISlaveInfo ads7846_info = { - .qdev.name ="ads7846", - .qdev.size = sizeof(ADS7846State), - .init = ads7846_init, - .transfer = ads7846_transfer +static void ads7846_class_init(ObjectClass *klass, void *data) +{ + SSISlaveClass *k = SSI_SLAVE_CLASS(klass); + + k->init = ads7846_init; + k->transfer = ads7846_transfer; +} + +static DeviceInfo ads7846_info = { + .name = "ads7846", + .size = sizeof(ADS7846State), + .class_init = ads7846_class_init, }; static void ads7846_register_devices(void) |