aboutsummaryrefslogtreecommitdiff
path: root/hw/max7310.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/max7310.c
parent57b452a8487df30d084ce2b56a993ba7473469e3 (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/max7310.c')
-rw-r--r--hw/max7310.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/hw/max7310.c b/hw/max7310.c
index 69ede32a6e..a571e57e90 100644
--- a/hw/max7310.c
+++ b/hw/max7310.c
@@ -218,6 +218,8 @@ void max7310_gpio_out_set(i2c_slave *i2c, int line, qemu_irq handler)
}
static I2CSlaveInfo max7310_info = {
+ .qdev.name = "max7310",
+ .qdev.size = sizeof(MAX7310State),
.init = max7310_init,
.event = max7310_event,
.recv = max7310_rx,
@@ -226,7 +228,7 @@ static I2CSlaveInfo max7310_info = {
static void max7310_register_devices(void)
{
- i2c_register_slave("max7310", sizeof(MAX7310State), &max7310_info);
+ i2c_register_slave(&max7310_info);
}
device_init(max7310_register_devices)