summaryrefslogtreecommitdiffstats
path: root/hw/i2c.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/i2c.c
parent57b452a8487df30d084ce2b56a993ba7473469e3 (diff)
downloadhqemu-074f2fff798cb8f9588080b740dc356217a24720.zip
hqemu-074f2fff798cb8f9588080b740dc356217a24720.tar.gz
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/i2c.c')
-rw-r--r--hw/i2c.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/hw/i2c.c b/hw/i2c.c
index 8a0c4d7..838f40f 100644
--- a/hw/i2c.c
+++ b/hw/i2c.c
@@ -152,12 +152,12 @@ static void i2c_slave_qdev_init(DeviceState *dev, DeviceInfo *base)
info->init(s);
}
-void i2c_register_slave(const char *name, int size, I2CSlaveInfo *info)
+void i2c_register_slave(I2CSlaveInfo *info)
{
- assert(size >= sizeof(i2c_slave));
+ assert(info->qdev.size >= sizeof(i2c_slave));
info->qdev.init = i2c_slave_qdev_init;
info->qdev.bus_type = BUS_TYPE_I2C;
- qdev_register(name, size, &info->qdev);
+ qdev_register(&info->qdev);
}
DeviceState *i2c_create_slave(i2c_bus *bus, const char *name, int addr)
OpenPOWER on IntegriCloud