summaryrefslogtreecommitdiffstats
path: root/hw/i2c/core.c
diff options
context:
space:
mode:
authorAndreas Färber <afaerber@suse.de>2013-06-07 14:45:17 +0200
committerAndreas Färber <afaerber@suse.de>2013-06-07 14:55:33 +0200
commitfef7fbc92496f5f6d2b7395263830bce15ebf410 (patch)
treea18ccc5c8b20fe7c25ac9df788419af919d7a8f6 /hw/i2c/core.c
parent4a17cc4f285d7ffe41847bf728cd88c736237416 (diff)
downloadhqemu-fef7fbc92496f5f6d2b7395263830bce15ebf410.zip
hqemu-fef7fbc92496f5f6d2b7395263830bce15ebf410.tar.gz
qdev: Drop FROM_QBUS() macro
Use QOM cast macros I2C_BUS(), SSI_BUS(), PCI_BUS() instead. Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'hw/i2c/core.c')
-rw-r--r--hw/i2c/core.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/i2c/core.c b/hw/i2c/core.c
index 0c4fc1d..22ef3b9 100644
--- a/hw/i2c/core.c
+++ b/hw/i2c/core.c
@@ -66,7 +66,7 @@ i2c_bus *i2c_init_bus(DeviceState *parent, const char *name)
{
i2c_bus *bus;
- bus = FROM_QBUS(i2c_bus, qbus_create(TYPE_I2C_BUS, parent, name));
+ bus = I2C_BUS(qbus_create(TYPE_I2C_BUS, parent, name));
vmstate_register(NULL, -1, &vmstate_i2c_bus, bus);
return bus;
}
@@ -183,7 +183,7 @@ static int i2c_slave_post_load(void *opaque, int version_id)
{
I2CSlave *dev = opaque;
i2c_bus *bus;
- bus = FROM_QBUS(i2c_bus, qdev_get_parent_bus(&dev->qdev));
+ bus = I2C_BUS(qdev_get_parent_bus(DEVICE(dev)));
if (bus->saved_address == dev->address) {
bus->current_dev = dev;
}
OpenPOWER on IntegriCloud