Patchwork [v3,06/11] sun4u: give ISA bus to ISA methods

login
register
mail settings
Submitter Hervé Poussineau
Date Dec. 15, 2011, 9:09 p.m.
Message ID <1323983401-18345-7-git-send-email-hpoussin@reactos.org>
Download mbox | patch
Permalink /patch/131744/
State New
Headers show

Comments

Hervé Poussineau - Dec. 15, 2011, 9:09 p.m.
Signed-off-by: Hervé Poussineau <hpoussin@reactos.org>
---
 hw/sun4u.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

Patch

diff --git a/hw/sun4u.c b/hw/sun4u.c
index dfb81da..e3e8dde 100644
--- a/hw/sun4u.c
+++ b/hw/sun4u.c
@@ -530,10 +530,12 @@  static ISABus *
 pci_ebus_init(PCIBus *bus, int devfn)
 {
     qemu_irq *isa_irq;
+    PCIDevice *pci_dev;
     ISABus *isa_bus;
 
-    pci_create_simple(bus, devfn, "ebus");
-    isa_bus = NULL;
+    pci_dev = pci_create_simple(bus, devfn, "ebus");
+    isa_bus = DO_UPCAST(ISABus, qbus,
+                        qdev_get_child_bus(&pci_dev->qdev, "isa.0"));
     isa_irq = qemu_allocate_irqs(dummy_isa_irq_handler, NULL, 16);
     isa_bus_irqs(isa_bus, isa_irq);
     return isa_bus;