]> git.proxmox.com Git - qemu.git/commitdiff
isa: Add isa_bus_from_device() method
authorHervé Poussineau <hpoussin@reactos.org>
Sat, 17 Mar 2012 14:39:43 +0000 (15:39 +0100)
committerAndreas Färber <andreas.faerber@web.de>
Sat, 28 Apr 2012 18:51:54 +0000 (20:51 +0200)
Signed-off-by: Hervé Poussineau <hpoussin@reactos.org>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Andreas Färber <andreas.faerber@web.de>
hw/isa.h

index 40373fb10730dcac5d41070a94073d7f9edc3334..f7bc4b5a95d38070a0bb69e5352d575c59a617fe 100644 (file)
--- a/hw/isa.h
+++ b/hw/isa.h
@@ -76,6 +76,11 @@ void isa_register_portio_list(ISADevice *dev, uint16_t start,
                               const MemoryRegionPortio *portio,
                               void *opaque, const char *name);
 
+static inline ISABus *isa_bus_from_device(ISADevice *d)
+{
+    return DO_UPCAST(ISABus, qbus, d->qdev.parent_bus);
+}
+
 extern target_phys_addr_t isa_mem_base;
 
 void isa_mmio_setup(MemoryRegion *mr, target_phys_addr_t size);