Signed-off-by: Hervé Poussineau <hpous...@reactos.org>

Avoid global variable for PCIBus. Inline PCI bus creation.
Suppress potential gcc 4.6 write-only variable warning.

Signed-off-by: Andreas Färber <andreas.faer...@web.de>
---
 hw/ppc_prep.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/hw/ppc_prep.c b/hw/ppc_prep.c
index 071c149..50cb6c7 100644
--- a/hw/ppc_prep.c
+++ b/hw/ppc_prep.c
@@ -38,6 +38,7 @@
 #include "loader.h"
 #include "mc146818rtc.h"
 #include "blockdev.h"
+#include "sysbus.h"
 
 //#define HARD_DEBUG_PPC_IO
 //#define DEBUG_PPC_IO
@@ -774,6 +775,8 @@ static void ibm_40p_init(ram_addr_t ram_size,
     char *filename;
     int bios_size;
     ram_addr_t ram_offset, bios_offset;
+    DeviceState *dev;
+    PCIBus *pci_bus;
 
     // IBM E15 graphic adapter (S3 Vision864)
     // PowerPC 601
@@ -816,6 +819,11 @@ static void ibm_40p_init(ram_addr_t ram_size,
     if (filename) {
         qemu_free(filename);
     }
+
+    /* PCI host */
+    dev = sysbus_create_simple("prep-pci", 0x80800000, NULL);
+    pci_bus = (PCIBus *)qdev_get_child_bus(dev, "pci");
+    (void)pci_bus;
 }
 
 static QEMUMachine prep_machine = {
-- 
1.7.5.3


Reply via email to