From patchwork Sun Jan 20 17:56:18 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [for-1.4?] isa: QOM'ify isa_bus_from_device() Date: Sun, 20 Jan 2013 07:56:18 -0000 From: =?utf-8?q?Andreas_F=C3=A4rber?= X-Patchwork-Id: 213971 Message-Id: <1358704579-15210-1-git-send-email-afaerber@suse.de> To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Andreas=20F=C3=A4rber?= , Anthony Liguori 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 Cc: Anthony Liguori --- hw/isa.h | 2 +- 1 Datei geändert, 1 Zeile hinzugefügt(+), 1 Zeile entfernt(-) diff --git a/hw/isa.h b/hw/isa.h index 62e89d3..7a8874a 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;