From patchwork Mon Apr 30 14:47:17 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Andreas_F=C3=A4rber?= X-Patchwork-Id: 155881 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id BB9DEB6FA1 for ; Tue, 1 May 2012 00:47:48 +1000 (EST) Received: from localhost ([::1]:36305 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SOrtC-0000ip-JC for incoming@patchwork.ozlabs.org; Mon, 30 Apr 2012 10:47:46 -0400 Received: from eggs.gnu.org ([208.118.235.92]:44285) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SOrsv-0000he-KL for qemu-devel@nongnu.org; Mon, 30 Apr 2012 10:47:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SOrss-0003ae-AE for qemu-devel@nongnu.org; Mon, 30 Apr 2012 10:47:29 -0400 Received: from mout.web.de ([212.227.15.4]:60937) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SOrss-0003Zh-0n for qemu-devel@nongnu.org; Mon, 30 Apr 2012 10:47:26 -0400 Received: from localhost.localdomain ([195.135.221.2]) by smtp.web.de (mrweb002) with ESMTPA (Nemesis) id 0MdLcJ-1SgGHH1dqN-00IVs0; Mon, 30 Apr 2012 16:47:24 +0200 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= To: qemu-devel@nongnu.org Date: Mon, 30 Apr 2012 16:47:17 +0200 Message-Id: <1335797240-14255-4-git-send-email-andreas.faerber@web.de> X-Mailer: git-send-email 1.7.7 In-Reply-To: <1335797240-14255-1-git-send-email-andreas.faerber@web.de> References: <1335797240-14255-1-git-send-email-andreas.faerber@web.de> MIME-Version: 1.0 X-Provags-ID: V02:K0:VrQLk/j1tP2wAFn6esFUxnM+MO9UFEs0vYE6lGMVOcZ Uc1T0RMqFWmkK49gCKT19R1Ao/iYLBzrsTTrUVa5gdnu7Z9pIT 1ukOMHb+vSJS1x6RYmNgBEKvN2HMyPwwRIlxB6yKkpiuhr2Sf3 MacUdnBf4OSYPwe6Z56GnDtd8msRI/bfSme1XbGwXuULUGXq6A 6K9MmWgBRHAY5VT8FhPwQ== X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 212.227.15.4 Cc: blauwirbel@gmail.com, =?UTF-8?q?Andreas=20F=C3=A4rber?= , =?UTF-8?q?Herv=C3=A9=20Poussineau?= Subject: [Qemu-devel] [PATCH 3/5] isa: Add isa_bus_from_device() method X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Hervé Poussineau Signed-off-by: Hervé Poussineau Acked-by: Gerd Hoffmann Signed-off-by: Andreas Färber --- hw/isa.h | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/hw/isa.h b/hw/isa.h index 40373fb..f7bc4b5 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);