diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2009-06-10 09:41:42 +0200 |
---|---|---|
committer | Paul Brook <paul@codesourcery.com> | 2009-06-11 13:47:36 +0100 |
commit | 074f2fff798cb8f9588080b740dc356217a24720 (patch) | |
tree | 4a7267d64bbe8d679627699b6545c9fcd23bb270 /hw/smbus.c | |
parent | 57b452a8487df30d084ce2b56a993ba7473469e3 (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/smbus.c')
-rw-r--r-- | hw/smbus.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/hw/smbus.c b/hw/smbus.c index 6bea4faabb..5618902e7a 100644 --- a/hw/smbus.c +++ b/hw/smbus.c @@ -206,14 +206,14 @@ static void smbus_device_init(i2c_slave *i2c) t->init(dev); } -void smbus_register_device(const char *name, int size, SMBusDeviceInfo *info) +void smbus_register_device(SMBusDeviceInfo *info) { - assert(size >= sizeof(SMBusDevice)); + assert(info->i2c.qdev.size >= sizeof(SMBusDevice)); info->i2c.init = smbus_device_init; info->i2c.event = smbus_i2c_event; info->i2c.recv = smbus_i2c_recv; info->i2c.send = smbus_i2c_send; - i2c_register_slave(name, size, &info->i2c); + i2c_register_slave(&info->i2c); } /* Master device commands. */ |