]> git.proxmox.com Git - mirror_qemu.git/commitdiff
isa: QOM'ify isa_bus_from_device()
authorAndreas Färber <afaerber@suse.de>
Sun, 20 Jan 2013 17:56:18 +0000 (18:56 +0100)
committerAnthony Liguori <aliguori@us.ibm.com>
Fri, 1 Feb 2013 16:43:28 +0000 (10:43 -0600)
DeviceState::parent_bus is document as private and should be accessed
through qdev_get_parent_bus(). Use a DEVICE() cast instead of accessing
ISADevice's qdev field directly. Use ISA_BUS() in place of DO_UPCAST().

Signed-off-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
hw/isa.h

index 62e89d3bcdb07975315d8d8341daf8a4a9420b2f..7a8874abfd3ff2f2716e02c1eac320bc713d3415 100644 (file)
--- a/hw/isa.h
+++ b/hw/isa.h
@@ -82,7 +82,7 @@ void isa_register_portio_list(ISADevice *dev, uint16_t start,
 
 static inline ISABus *isa_bus_from_device(ISADevice *d)
 {
-    return DO_UPCAST(ISABus, qbus, d->qdev.parent_bus);
+    return ISA_BUS(qdev_get_parent_bus(DEVICE(d)));
 }
 
 extern hwaddr isa_mem_base;