aboutsummaryrefslogtreecommitdiff
path: root/hw/pxa2xx.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/pxa2xx.c
parent57b452a8487df30d084ce2b56a993ba7473469e3 (diff)
downloadqemu-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/pxa2xx.c')
-rw-r--r--hw/pxa2xx.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/hw/pxa2xx.c b/hw/pxa2xx.c
index febe527..e001d1f 100644
--- a/hw/pxa2xx.c
+++ b/hw/pxa2xx.c
@@ -1485,6 +1485,8 @@ static void pxa2xx_i2c_slave_init(i2c_slave *i2c)
}
static I2CSlaveInfo pxa2xx_i2c_slave_info = {
+ .qdev.name = "pxa2xx-i2c-slave",
+ .qdev.size = sizeof(PXA2xxI2CSlaveState),
.init = pxa2xx_i2c_slave_init,
.event = pxa2xx_i2c_event,
.recv = pxa2xx_i2c_rx,
@@ -2258,8 +2260,7 @@ PXA2xxState *pxa255_init(unsigned int sdram_size)
static void pxa2xx_register_devices(void)
{
- i2c_register_slave("pxa2xx-i2c-slave", sizeof(PXA2xxI2CSlaveState),
- &pxa2xx_i2c_slave_info);
+ i2c_register_slave(&pxa2xx_i2c_slave_info);
sysbus_register_dev("pxa2xx-ssp", sizeof(PXA2xxSSPState), pxa2xx_ssp_init);
}