aboutsummaryrefslogtreecommitdiff
path: root/hw/isa
diff options
context:
space:
mode:
authorAndreas Färber <afaerber@suse.de>2013-06-07 14:11:07 +0200
committerAndreas Färber <afaerber@suse.de>2013-06-07 14:55:25 +0200
commit2ae0e48d5fd2cb7c5bc5c392edf2dc33ac2959d0 (patch)
tree2a614f1d75125766ed76394ede8bfa5e70670aa6 /hw/isa
parentd2628b7d18521dacd3d4d246602e9bb3fc2a43dd (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')
-rw-r--r--hw/isa/i82378.c2
-rw-r--r--hw/isa/isa-bus.c8
-rw-r--r--hw/isa/piix4.c2
-rw-r--r--hw/isa/vt82c686.c2
4 files changed, 7 insertions, 7 deletions
diff --git a/hw/isa/i82378.c b/hw/isa/i82378.c
index cced9aff26..278e178173 100644
--- a/hw/isa/i82378.c
+++ b/hw/isa/i82378.c
@@ -168,7 +168,7 @@ static void i82378_request_pic_irq(void *opaque, int irq, int level)
static void i82378_init(DeviceState *dev, I82378State *s)
{
- ISABus *isabus = DO_UPCAST(ISABus, qbus, qdev_get_child_bus(dev, "isa.0"));
+ ISABus *isabus = ISA_BUS(qdev_get_child_bus(dev, "isa.0"));
ISADevice *pit;
ISADevice *isa;
qemu_irq *out0_irq;
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);
}
diff --git a/hw/isa/piix4.c b/hw/isa/piix4.c
index d750413a7e..1a1d4518ce 100644
--- a/hw/isa/piix4.c
+++ b/hw/isa/piix4.c
@@ -98,7 +98,7 @@ int piix4_init(PCIBus *bus, ISABus **isa_bus, int devfn)
PCIDevice *d;
d = pci_create_simple_multifunction(bus, devfn, true, "PIIX4");
- *isa_bus = DO_UPCAST(ISABus, qbus, qdev_get_child_bus(&d->qdev, "isa.0"));
+ *isa_bus = ISA_BUS(qdev_get_child_bus(DEVICE(d), "isa.0"));
return d->devfn;
}
diff --git a/hw/isa/vt82c686.c b/hw/isa/vt82c686.c
index 52619276bd..391d90d14a 100644
--- a/hw/isa/vt82c686.c
+++ b/hw/isa/vt82c686.c
@@ -450,7 +450,7 @@ ISABus *vt82c686b_init(PCIBus *bus, int devfn)
d = pci_create_simple_multifunction(bus, devfn, true, "VT82C686B");
- return DO_UPCAST(ISABus, qbus, qdev_get_child_bus(&d->qdev, "isa.0"));
+ return ISA_BUS(qdev_get_child_bus(DEVICE(d), "isa.0"));
}
static void via_class_init(ObjectClass *klass, void *data)