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/max111x.c | |
parent | 57b452a8487df30d084ce2b56a993ba7473469e3 (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/max111x.c')
-rw-r--r-- | hw/max111x.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/hw/max111x.c b/hw/max111x.c index 217233cffc..f7023a8e9b 100644 --- a/hw/max111x.c +++ b/hw/max111x.c @@ -164,19 +164,23 @@ void max111x_set_input(DeviceState *dev, int line, uint8_t value) } static SSISlaveInfo max1110_info = { + .qdev.name = "max1110", + .qdev.size = sizeof(MAX111xState), .init = max1110_init, .transfer = max111x_transfer }; static SSISlaveInfo max1111_info = { + .qdev.name = "max1111", + .qdev.size = sizeof(MAX111xState), .init = max1111_init, .transfer = max111x_transfer }; static void max111x_register_devices(void) { - ssi_register_slave("max1110", sizeof(MAX111xState), &max1110_info); - ssi_register_slave("max1111", sizeof(MAX111xState), &max1111_info); + ssi_register_slave(&max1110_info); + ssi_register_slave(&max1111_info); } device_init(max111x_register_devices) |