diff options
author | Anthony Liguori <aliguori@us.ibm.com> | 2011-12-16 13:36:39 -0600 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2012-01-27 10:50:47 -0600 |
commit | cd6c4cf28b529aaee0367256d37f349e3b125818 (patch) | |
tree | a13e1eee93c85362ef4ce4c33cc3608412c64f7a /hw/ads7846.c | |
parent | ba7c05205c4ba2fd08096b0083fc1e5decf3c342 (diff) |
ssi: convert to QEMU Object Model
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
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) |