aboutsummaryrefslogtreecommitdiff
path: root/hw/ads7846.c
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2009-06-10 09:41:42 +0200
committerPaul Brook <paul@codesourcery.com>2009-06-11 13:47:36 +0100
commit074f2fff798cb8f9588080b740dc356217a24720 (patch)
tree4a7267d64bbe8d679627699b6545c9fcd23bb270 /hw/ads7846.c
parent57b452a8487df30d084ce2b56a993ba7473469e3 (diff)
qdev: move name+size into DeviceInfo (v2)
Rationale: move device information from code to data structures. v2: Adapt the drivers missed in the first version. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'hw/ads7846.c')
-rw-r--r--hw/ads7846.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/hw/ads7846.c b/hw/ads7846.c
index 1c65ffe15e..7d1cbc7114 100644
--- a/hw/ads7846.c
+++ b/hw/ads7846.c
@@ -155,13 +155,15 @@ static void ads7846_init(SSISlave *dev)
}
static SSISlaveInfo ads7846_info = {
+ .qdev.name ="ads7846",
+ .qdev.size = sizeof(ADS7846State),
.init = ads7846_init,
.transfer = ads7846_transfer
};
static void ads7846_register_devices(void)
{
- ssi_register_slave("ads7846", sizeof(ADS7846State), &ads7846_info);
+ ssi_register_slave(&ads7846_info);
}
device_init(ads7846_register_devices)