From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57831) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V3t2I-0005j5-KQ for qemu-devel@nongnu.org; Mon, 29 Jul 2013 15:23:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V3t26-000328-OP for qemu-devel@nongnu.org; Mon, 29 Jul 2013 15:23:14 -0400 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Mon, 29 Jul 2013 21:20:29 +0200 Message-Id: <1375125630-24869-173-git-send-email-afaerber@suse.de> In-Reply-To: <1375125630-24869-1-git-send-email-afaerber@suse.de> References: <1375125630-24869-1-git-send-email-afaerber@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PULL 172/173] spapr_pci: QOM cast cleanup List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: "open list:sPAPR" , =?UTF-8?q?Andreas=20F=C3=A4rber?= , Alexander Graf Signed-off-by: Andreas F=C3=A4rber --- hw/ppc/spapr_pci.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c index 3156fdd..1ca35a0 100644 --- a/hw/ppc/spapr_pci.c +++ b/hw/ppc/spapr_pci.c @@ -479,6 +479,7 @@ static AddressSpace *spapr_pci_dma_iommu(PCIBus *bus,= void *opaque, int devfn) =20 static int spapr_phb_init(SysBusDevice *s) { + DeviceState *dev =3D DEVICE(s); sPAPRPHBState *sphb =3D SPAPR_PCI_HOST_BRIDGE(s); PCIHostState *phb =3D PCI_HOST_BRIDGE(s); const char *busname; @@ -596,14 +597,14 @@ static int spapr_phb_init(SysBusDevice *s) * since it's unique by construction, and makes the guest visible * BUID clear. */ - if (s->qdev.id) { + if (dev->id) { busname =3D NULL; } else if (sphb->index =3D=3D 0) { busname =3D "pci"; } else { busname =3D sphb->dtbusname; } - bus =3D pci_register_bus(DEVICE(s), busname, + bus =3D pci_register_bus(dev, busname, pci_spapr_set_irq, pci_spapr_map_irq, sphb, &sphb->memspace, &sphb->iospace, PCI_DEVFN(0, 0), PCI_NUM_PINS, TYPE_PCI_BUS); @@ -611,7 +612,7 @@ static int spapr_phb_init(SysBusDevice *s) =20 sphb->dma_window_start =3D 0; sphb->dma_window_size =3D 0x40000000; - sphb->tcet =3D spapr_tce_new_table(DEVICE(sphb), sphb->dma_liobn, + sphb->tcet =3D spapr_tce_new_table(dev, sphb->dma_liobn, sphb->dma_window_size); if (!sphb->tcet) { fprintf(stderr, "Unable to create TCE table for %s\n", sphb->dtb= usname); --=20 1.8.1.4