From 074f2fff798cb8f9588080b740dc356217a24720 Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Wed, 10 Jun 2009 09:41:42 +0200 Subject: 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 --- hw/pxa2xx.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'hw/pxa2xx.c') 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); } -- cgit v1.1