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/spitz.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/spitz.c')
-rw-r--r-- | hw/spitz.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -1076,19 +1076,23 @@ static void spitz_machine_init(void) machine_init(spitz_machine_init); static SSISlaveInfo corgi_ssp_info = { + .qdev.name = "corgi-ssp", + .qdev.size = sizeof(CorgiSSPState), .init = corgi_ssp_init, .transfer = corgi_ssp_transfer }; static SSISlaveInfo spitz_lcdtg_info = { + .qdev.name = "spitz-lcdtg", + .qdev.size = sizeof(SpitzLCDTG), .init = spitz_lcdtg_init, .transfer = spitz_lcdtg_transfer }; static void spitz_register_devices(void) { - ssi_register_slave("corgi-ssp", sizeof(CorgiSSPState), &corgi_ssp_info); - ssi_register_slave("spitz-lcdtg", sizeof(SpitzLCDTG), &spitz_lcdtg_info); + ssi_register_slave(&corgi_ssp_info); + ssi_register_slave(&spitz_lcdtg_info); } device_init(spitz_register_devices) |