diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2009-06-10 09:41:42 +0200 |
---|---|---|
committer | Paul Brook <paul@codesourcery.com> | 2009-06-11 13:47:36 +0100 |
commit | 074f2fff798cb8f9588080b740dc356217a24720 (patch) | |
tree | 4a7267d64bbe8d679627699b6545c9fcd23bb270 /hw/ssd0303.c | |
parent | 57b452a8487df30d084ce2b56a993ba7473469e3 (diff) | |
download | qemu-074f2fff798cb8f9588080b740dc356217a24720.zip qemu-074f2fff798cb8f9588080b740dc356217a24720.tar.gz qemu-074f2fff798cb8f9588080b740dc356217a24720.tar.bz2 |
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/ssd0303.c')
-rw-r--r-- | hw/ssd0303.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/hw/ssd0303.c b/hw/ssd0303.c index 5a3a29e..6872ef5 100644 --- a/hw/ssd0303.c +++ b/hw/ssd0303.c @@ -316,6 +316,8 @@ static void ssd0303_init(i2c_slave *i2c) } static I2CSlaveInfo ssd0303_info = { + .qdev.name = "ssd0303", + .qdev.size = sizeof(ssd0303_state), .init = ssd0303_init, .event = ssd0303_event, .recv = ssd0303_recv, @@ -324,7 +326,7 @@ static I2CSlaveInfo ssd0303_info = { static void ssd0303_register_devices(void) { - i2c_register_slave("ssd0303", sizeof(ssd0303_state), &ssd0303_info); + i2c_register_slave(&ssd0303_info); } device_init(ssd0303_register_devices) |