]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/qemu-xen.git/commitdiff
pseries pci: removed redundant busdev
authorAlexey Kardashevskiy <aik@ozlabs.ru>
Wed, 13 Jun 2012 18:38:50 +0000 (18:38 +0000)
committerAlexander Graf <agraf@suse.de>
Wed, 15 Aug 2012 17:43:13 +0000 (19:43 +0200)
The PCIHostState struct already contains SysBusDevice so
the one in sPAPRPHBState has to go.

Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Signed-off-by: Alexander Graf <agraf@suse.de>
hw/spapr_pci.c
hw/spapr_pci.h

index b2e4f785eae8ec3f59cf29dbb5347d1f3be3d096..5bee180989824bcf105ef4d1127270b680882e93 100644 (file)
@@ -276,7 +276,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;
@@ -314,7 +314,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,
index d9e46e22e32134b78caca0dcc35f86f00e5ceb29..a141764a6a5377e52a448ffee5176b78a770495d 100644 (file)
@@ -28,7 +28,6 @@
 #include "hw/xics.h"
 
 typedef struct sPAPRPHBState {
-    SysBusDevice busdev;
     PCIHostState host_state;
 
     uint64_t buid;