Skip to contentSkip to conversation

pseries pci: removed redundand busdev

PATCH Applied Alexey Kardashevskiy 2 participants 2 messages Jun 14, 2012 – Jun 28, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 pseries pci: removed redundand busdev

The PCIHostState struct already contains SysBusDevice so the one in sPAPRPHBState has to go.

---
 hw/spapr_pci.c |    4 ++--
 hw/spapr_pci.h |    1 -
 2 files changed, 2 insertions(+), 3 deletions(-)
hw/spapr_pci.c +2 -2
index 75943cf..1c0b605 100644
@@ -215,7 +215,7 @@ static DMAContext *spapr_pci_dma_context_fn(PCIBus *bus, void *opaque,
 
 static int spapr_phb_init(SysBusDevice *s)
 {
-    sPAPRPHBState *phb = FROM_SYSBUS(sPAPRPHBState, s);
+    sPAPRPHBState *phb = DO_UPCAST(sPAPRPHBState, host_state.busdev, s);
     char *namebuf;
     int i;
     PCIBus *bus;
@@ -253,7 +253,7 @@ static int spapr_phb_init(SysBusDevice *s)
     memory_region_add_subregion(get_system_memory(), phb->io_win_addr,
                                 &phb->iowindow);
 
-    bus = pci_register_bus(&phb->busdev.qdev,
+    bus = pci_register_bus(&phb->host_state.busdev.qdev,
                            phb->busname ? phb->busname : phb->dtbusname,
                            pci_spapr_set_irq, pci_spapr_map_irq, phb,
                            &phb->memspace, &phb->iospace,
hw/spapr_pci.h +0 -1
index d9e46e2..a141764 100644
@@ -28,7 +28,6 @@
 #include "hw/xics.h"
 
 typedef struct sPAPRPHBState {
-    SysBusDevice busdev;
     PCIHostState host_state;
 
     uint64_t buid;
Signature · 1 line
1.7.7.3