diff options
Diffstat (limited to 'hw/arm/pxa2xx.c')
-rw-r--r-- | hw/arm/pxa2xx.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/hw/arm/pxa2xx.c b/hw/arm/pxa2xx.c index 7de64534d5..17ddd3fab8 100644 --- a/hw/arm/pxa2xx.c +++ b/hw/arm/pxa2xx.c @@ -1479,6 +1479,7 @@ PXA2xxI2CState *pxa2xx_i2c_init(hwaddr base, DeviceState *dev; SysBusDevice *i2c_dev; PXA2xxI2CState *s; + i2c_bus *i2cbus; dev = qdev_create(NULL, TYPE_PXA2XX_I2C); qdev_prop_set_uint32(dev, "size", region_size + 1); @@ -1491,7 +1492,8 @@ PXA2xxI2CState *pxa2xx_i2c_init(hwaddr base, s = PXA2XX_I2C(i2c_dev); /* FIXME: Should the slave device really be on a separate bus? */ - dev = i2c_create_slave(i2c_init_bus(NULL, "dummy"), "pxa2xx-i2c-slave", 0); + i2cbus = i2c_init_bus(dev, "dummy"); + dev = i2c_create_slave(i2cbus, "pxa2xx-i2c-slave", 0); s->slave = FROM_I2C_SLAVE(PXA2xxI2CSlaveState, I2C_SLAVE(dev)); s->slave->host = s; |