[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH qom-next for-1.6 10/11] spapr_pci: QOM cast cleanup
From: |
Andreas Färber |
Subject: |
[Qemu-devel] [PATCH qom-next for-1.6 10/11] spapr_pci: QOM cast cleanup |
Date: |
Sat, 27 Jul 2013 22:19:55 +0200 |
Signed-off-by: Andreas Färber <address@hidden>
---
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 c880a75..e6d34bc 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)
static int spapr_phb_init(SysBusDevice *s)
{
+ DeviceState *dev = DEVICE(s);
sPAPRPHBState *sphb = SPAPR_PCI_HOST_BRIDGE(s);
PCIHostState *phb = 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 = NULL;
} else if (sphb->index == 0) {
busname = "pci";
} else {
busname = sphb->dtbusname;
}
- bus = pci_register_bus(DEVICE(s), busname,
+ bus = 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)
sphb->dma_window_start = 0;
sphb->dma_window_size = 0x40000000;
- sphb->tcet = spapr_tce_new_table(DEVICE(sphb), sphb->dma_liobn,
+ sphb->tcet = 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->dtbusname);
--
1.8.1.4
- [Qemu-devel] [PATCH qom-next for-1.6 00/11] sysbus: QOM cast cleanups -- plus outlook, Andreas Färber, 2013/07/27
- [Qemu-devel] [PATCH qom-next for-1.6 01/11] sysbus: Drop FROM_SYSBUS(), Andreas Färber, 2013/07/27
- [Qemu-devel] [PATCH qom-next for-1.6 09/11] mips_malta: QOM cast cleanup, Andreas Färber, 2013/07/27
- [Qemu-devel] [PATCH qom-next for-1.6 02/11] sysbus: Remove unused sysbus_new() prototype, Andreas Färber, 2013/07/27
- [Qemu-devel] [PATCH qom-next for-1.6 05/11] mipsnet: QOM cast cleanup, Andreas Färber, 2013/07/27
- [Qemu-devel] [PATCH qom-next for-1.6 08/11] ioapic: QOM cast cleanup, Andreas Färber, 2013/07/27
- [Qemu-devel] [PATCH qom-next for-1.6 07/11] kvm/ioapic: QOM cast cleanup, Andreas Färber, 2013/07/27
- [Qemu-devel] [PATCH qom-next for-1.6 03/11] exynos4210_i2c: QOM cast cleanup, Andreas Färber, 2013/07/27
- [Qemu-devel] [PATCH qom-next for-1.6 04/11] opencores_eth: QOM cast cleanup, Andreas Färber, 2013/07/27
- [Qemu-devel] [PATCH qom-next for-1.6 10/11] spapr_pci: QOM cast cleanup,
Andreas Färber <=
- [Qemu-devel] [PATCH qom-next for-1.6 06/11] kvmvapic: QOM cast cleanup, Andreas Färber, 2013/07/27
- [Qemu-devel] [PATCH qom-next for-1.6 11/11] sysbus: QOM parent field cleanup for SysBusDevice, Andreas Färber, 2013/07/27