aboutsummaryrefslogtreecommitdiff
path: root/hw/pci/pci_bridge.c
diff options
context:
space:
mode:
authorAlex Williamson <alex.williamson@redhat.com>2013-03-14 16:01:11 -0600
committerMichael S. Tsirkin <mst@redhat.com>2013-03-26 21:02:18 +0200
commit60a0e44320cc2601236450fbe95d952830192a1d (patch)
tree1b7c7045b82c95019798fdf314be12d052e4a748 /hw/pci/pci_bridge.c
parentcf09458d644934976aa64e88bb41ef9a4cc2766a (diff)
pci: Allow PCI bus creation interfaces to specify the type of bus
No change to any types. Signed-off-by: Alex Williamson <alex.williamson@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/pci/pci_bridge.c')
-rw-r--r--hw/pci/pci_bridge.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/hw/pci/pci_bridge.c b/hw/pci/pci_bridge.c
index bf93ac6ed1..24be6c5067 100644
--- a/hw/pci/pci_bridge.c
+++ b/hw/pci/pci_bridge.c
@@ -328,7 +328,7 @@ void pci_bridge_reset(DeviceState *qdev)
}
/* default qdev initialization function for PCI-to-PCI bridge */
-int pci_bridge_initfn(PCIDevice *dev)
+int pci_bridge_initfn(PCIDevice *dev, const char *typename)
{
PCIBus *parent = dev->bus;
PCIBridge *br = DO_UPCAST(PCIBridge, dev, dev);
@@ -363,8 +363,7 @@ int pci_bridge_initfn(PCIDevice *dev)
br->bus_name = dev->qdev.id;
}
- qbus_create_inplace(&sec_bus->qbus, TYPE_PCI_BUS, &dev->qdev,
- br->bus_name);
+ qbus_create_inplace(&sec_bus->qbus, typename, &dev->qdev, br->bus_name);
sec_bus->parent_dev = dev;
sec_bus->map_irq = br->map_irq ? br->map_irq : pci_swizzle_map_irq_fn;
sec_bus->address_space_mem = &br->address_space_mem;