diff options
author | Andreas Färber <afaerber@suse.de> | 2013-06-07 14:11:07 +0200 |
---|---|---|
committer | Andreas Färber <afaerber@suse.de> | 2013-06-07 14:55:25 +0200 |
commit | 2ae0e48d5fd2cb7c5bc5c392edf2dc33ac2959d0 (patch) | |
tree | 2a614f1d75125766ed76394ede8bfa5e70670aa6 /hw/isa/isa-bus.c | |
parent | d2628b7d18521dacd3d4d246602e9bb3fc2a43dd (diff) |
isa: QOM'ify ISABus
Rename its parent field and use ISA_BUS() where necessary.
Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'hw/isa/isa-bus.c')
-rw-r--r-- | hw/isa/isa-bus.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/hw/isa/isa-bus.c b/hw/isa/isa-bus.c index f12b15da32..7aa9b89b5c 100644 --- a/hw/isa/isa-bus.c +++ b/hw/isa/isa-bus.c @@ -55,7 +55,7 @@ ISABus *isa_bus_new(DeviceState *dev, MemoryRegion *address_space_io) qdev_init_nofail(dev); } - isabus = FROM_QBUS(ISABus, qbus_create(TYPE_ISA_BUS, dev, NULL)); + isabus = ISA_BUS(qbus_create(TYPE_ISA_BUS, dev, NULL)); isabus->address_space_io = address_space_io; return isabus; } @@ -76,7 +76,7 @@ void isa_bus_irqs(ISABus *bus, qemu_irq *irqs) */ qemu_irq isa_get_irq(ISADevice *dev, int isairq) { - assert(!dev || DO_UPCAST(ISABus, qbus, dev->qdev.parent_bus) == isabus); + assert(!dev || ISA_BUS(qdev_get_parent_bus(DEVICE(dev))) == isabus); if (isairq < 0 || isairq > 15) { hw_error("isa irq %d invalid", isairq); } @@ -135,7 +135,7 @@ ISADevice *isa_create(ISABus *bus, const char *name) hw_error("Tried to create isa device %s with no isa bus present.", name); } - dev = qdev_create(&bus->qbus, name); + dev = qdev_create(BUS(bus), name); return ISA_DEVICE(dev); } @@ -147,7 +147,7 @@ ISADevice *isa_try_create(ISABus *bus, const char *name) hw_error("Tried to create isa device %s with no isa bus present.", name); } - dev = qdev_try_create(&bus->qbus, name); + dev = qdev_try_create(BUS(bus), name); return ISA_DEVICE(dev); } |