diff options
Diffstat (limited to 'hw/smbus_eeprom.c')
-rw-r--r-- | hw/smbus_eeprom.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/hw/smbus_eeprom.c b/hw/smbus_eeprom.c index 05a70d9b1c..c071fb1e13 100644 --- a/hw/smbus_eeprom.c +++ b/hw/smbus_eeprom.c @@ -99,14 +99,20 @@ static void smbus_eeprom_init(SMBusDevice *dev) { SMBusEEPROMDevice *eeprom = (SMBusEEPROMDevice *)dev; - /* FIXME: Should be a blob rather than a ptr. */ - eeprom->data = qdev_get_prop_ptr(&dev->i2c.qdev, "data"); eeprom->offset = 0; } static SMBusDeviceInfo smbus_eeprom_info = { .i2c.qdev.name = "smbus-eeprom", .i2c.qdev.size = sizeof(SMBusEEPROMDevice), + .i2c.qdev.props = (Property[]) { + { + .name = "data", + .info = &qdev_prop_ptr, + .offset = offsetof(SMBusEEPROMDevice, data), + }, + {/* end of list */} + }, .init = smbus_eeprom_init, .quick_cmd = eeprom_quick_cmd, .send_byte = eeprom_send_byte, |