From 3e7b8f4e6f507e09e27b7449f3744596f19c0083 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Sun, 20 Jan 2013 18:56:18 +0100 Subject: [PATCH] isa: QOM'ify isa_bus_from_device() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Anthony Liguori --- hw/isa.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/isa.h b/hw/isa.h index 62e89d3bcd..7a8874abfd 100644 --- 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;