summaryrefslogtreecommitdiff
path: root/hw/spitz.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/spitz.c
parent57b452a8487df30d084ce2b56a993ba7473469e3 (diff)
downloadqemu-074f2fff798cb8f9588080b740dc356217a24720.tar.gz
qemu-074f2fff798cb8f9588080b740dc356217a24720.tar.bz2
qemu-074f2fff798cb8f9588080b740dc356217a24720.zip
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.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/hw/spitz.c b/hw/spitz.c
index aa1487b20a..b0d42adc93 100644
--- a/hw/spitz.c
+++ b/hw/spitz.c
@@ -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)