aboutsummaryrefslogtreecommitdiff
path: root/hw/smbus_eeprom.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/smbus_eeprom.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/smbus_eeprom.c')
-rw-r--r--hw/smbus_eeprom.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/hw/smbus_eeprom.c b/hw/smbus_eeprom.c
index 3f8b386994..05a70d9b1c 100644
--- a/hw/smbus_eeprom.c
+++ b/hw/smbus_eeprom.c
@@ -105,6 +105,8 @@ static void smbus_eeprom_init(SMBusDevice *dev)
}
static SMBusDeviceInfo smbus_eeprom_info = {
+ .i2c.qdev.name = "smbus-eeprom",
+ .i2c.qdev.size = sizeof(SMBusEEPROMDevice),
.init = smbus_eeprom_init,
.quick_cmd = eeprom_quick_cmd,
.send_byte = eeprom_send_byte,
@@ -115,8 +117,7 @@ static SMBusDeviceInfo smbus_eeprom_info = {
static void smbus_eeprom_register_devices(void)
{
- smbus_register_device("smbus-eeprom", sizeof(SMBusEEPROMDevice),
- &smbus_eeprom_info);
+ smbus_register_device(&smbus_eeprom_info);
}
device_init(smbus_eeprom_register_devices)