aboutsummaryrefslogtreecommitdiff
path: root/hw/pci
diff options
context:
space:
mode:
authorAndreas Färber <afaerber@suse.de>2013-08-24 00:02:27 +0200
committerAndreas Färber <afaerber@suse.de>2013-08-30 21:15:35 +0200
commitfb17dfe0575243a3f60dcefca37fa82ae682f146 (patch)
treee2b1bc60fe8cd608b5655c475793667da9f696ad /hw/pci
parente5f720391e0628131cb6548b3d27be6aa56ae7d4 (diff)
downloadqemu-fb17dfe0575243a3f60dcefca37fa82ae682f146.zip
qemu-fb17dfe0575243a3f60dcefca37fa82ae682f146.tar.gz
qemu-fb17dfe0575243a3f60dcefca37fa82ae682f146.tar.bz2
qdev: Pass size to qbus_create_inplace()
To be passed to object_initialize(). Since commit 39355c3826f5d9a2eb1ce3dc9b4cdd68893769d6 the argument is void*, so drop some superfluous (BusState *) casts or direct parent field usages. Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'hw/pci')
-rw-r--r--hw/pci/pci.c2
-rw-r--r--hw/pci/pci_bridge.c3
2 files changed, 3 insertions, 2 deletions
diff --git a/hw/pci/pci.c b/hw/pci/pci.c
index 397555c..e688f4a 100644
--- a/hw/pci/pci.c
+++ b/hw/pci/pci.c
@@ -318,7 +318,7 @@ void pci_bus_new_inplace(PCIBus *bus, size_t bus_size, DeviceState *parent,
MemoryRegion *address_space_io,
uint8_t devfn_min, const char *typename)
{
- qbus_create_inplace(bus, typename, parent, name);
+ qbus_create_inplace(bus, bus_size, typename, parent, name);
pci_bus_init(bus, parent, name, address_space_mem,
address_space_io, devfn_min);
}
diff --git a/hw/pci/pci_bridge.c b/hw/pci/pci_bridge.c
index a90671d..e6b22b8 100644
--- a/hw/pci/pci_bridge.c
+++ b/hw/pci/pci_bridge.c
@@ -367,7 +367,8 @@ int pci_bridge_initfn(PCIDevice *dev, const char *typename)
br->bus_name = dev->qdev.id;
}
- qbus_create_inplace(&sec_bus->qbus, typename, &dev->qdev, br->bus_name);
+ qbus_create_inplace(sec_bus, sizeof(br->sec_bus), typename, DEVICE(dev),
+ 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;