From a527b5452eb6bb7ee00c940c450e592f0b448042 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Poussineau?= Date: Sat, 17 Mar 2012 15:39:43 +0100 Subject: isa: Add isa_bus_from_device() method MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Hervé Poussineau Acked-by: Gerd Hoffmann Signed-off-by: Andreas Färber --- hw/isa.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'hw/isa.h') diff --git a/hw/isa.h b/hw/isa.h index 40373fb107..f7bc4b5a95 100644 --- 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); -- cgit v1.2.3