From patchwork Sat Feb 23 00:40:38 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: David Woodhouse X-Patchwork-Id: 222695 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 0A48C2C02A0 for ; Sat, 23 Feb 2013 11:41:40 +1100 (EST) Received: from localhost ([::1]:41145 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U93BK-0001cD-6n for incoming@patchwork.ozlabs.org; Fri, 22 Feb 2013 19:41:38 -0500 Received: from eggs.gnu.org ([208.118.235.92]:35463) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U93Ay-0001WL-Uq for qemu-devel@nongnu.org; Fri, 22 Feb 2013 19:41:23 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U93At-0000XV-28 for qemu-devel@nongnu.org; Fri, 22 Feb 2013 19:41:16 -0500 Received: from bombadil.infradead.org ([2001:4830:2446:ff00:4687:fcff:fea6:5117]:47746) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U93As-0000BX-Uj for qemu-devel@nongnu.org; Fri, 22 Feb 2013 19:41:10 -0500 Received: from shinybook.infradead.org ([2001:8b0:10b:1:e6ce:8fff:fe1f:f2c0]) by bombadil.infradead.org with esmtpsa (Exim 4.76 #1 (Red Hat Linux)) id 1U93AU-000476-4Q for qemu-devel@nongnu.org; Sat, 23 Feb 2013 00:40:46 +0000 Received: from dwmw2 by shinybook.infradead.org with local (Exim 4.80.1 #2 (Red Hat Linux)) id 1U93AS-0001D7-SK for qemu-devel@nongnu.org; Sat, 23 Feb 2013 00:40:44 +0000 From: David Woodhouse To: qemu-devel@nongnu.org Date: Sat, 23 Feb 2013 00:40:38 +0000 Message-Id: <1361580039-4459-3-git-send-email-dwmw2@infradead.org> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: <1361580039-4459-1-git-send-email-dwmw2@infradead.org> References: <1361580039-4459-1-git-send-email-dwmw2@infradead.org> MIME-Version: 1.0 X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org See http://www.infradead.org/rpr.html X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 2001:4830:2446:ff00:4687:fcff:fea6:5117 Subject: [Qemu-devel] [PATCH 2/3] piix_pci: Use DEVICE() and ISA_BUS() 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: David Woodhouse Signed-off-by: David Woodhouse Reviewed-by: Andreas Färber Tested-by: Laszlo Ersek Reviewed-by: Laszlo Ersek --- hw/piix_pci.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/hw/piix_pci.c b/hw/piix_pci.c index 6b69e26..19fc045 100644 --- a/hw/piix_pci.c +++ b/hw/piix_pci.c @@ -301,8 +301,7 @@ static PCIBus *i440fx_common_init(const char *device_name, pci_bus_set_route_irq_fn(b, piix3_route_intx_pin_to_irq); } piix3->pic = pic; - *isa_bus = DO_UPCAST(ISABus, qbus, - qdev_get_child_bus(&piix3->dev.qdev, "isa.0")); + *isa_bus = ISA_BUS(qdev_get_child_bus(DEVICE(piix3), "isa.0")); *piix3_devfn = piix3->dev.devfn; @@ -549,7 +548,7 @@ static int piix3_initfn(PCIDevice *dev) { PIIX3State *d = DO_UPCAST(PIIX3State, dev, dev); - isa_bus_new(&d->dev.qdev, pci_address_space_io(dev)); + isa_bus_new(DEVICE(d), pci_address_space_io(dev)); memory_region_init_io(&d->rcr_mem, &rcr_ops, d, "piix3-reset-control", 1); memory_region_add_subregion_overlap(pci_address_space_io(dev), RCR_IOPORT,