There are no external users for this function. Signed-off-by: Jan Kiszka <jan.kis...@siemens.com> --- hw/pci.c | 29 +++++++++++------------------ hw/pci.h | 5 ----- 2 files changed, 11 insertions(+), 23 deletions(-)
diff --git a/hw/pci.c b/hw/pci.c index 893f89c..33452ab 100644 --- a/hw/pci.c +++ b/hw/pci.c @@ -259,36 +259,29 @@ int pci_find_domain(const PCIBus *bus) return -1; } -void pci_bus_new_inplace(PCIBus *bus, DeviceState *parent, - const char *name, - MemoryRegion *address_space_mem, - MemoryRegion *address_space_io, - uint8_t devfn_min) +PCIBus *pci_bus_new(DeviceState *parent, const char *name, + MemoryRegion *address_space_mem, + MemoryRegion *address_space_io, + uint8_t devfn_min) { - qbus_create_inplace(&bus->qbus, &pci_bus_info, parent, name); + PCIBus *bus; + + bus = g_malloc0(sizeof(*bus)); + bus->qbus.qdev_allocated = 1; + assert(PCI_FUNC(devfn_min) == 0); bus->devfn_min = devfn_min; bus->address_space_mem = address_space_mem; bus->address_space_io = address_space_io; + qbus_create_inplace(&bus->qbus, &pci_bus_info, parent, name); + /* host bridge */ QLIST_INIT(&bus->child); pci_host_bus_register(0, bus); /* for now only pci domain 0 is supported */ vmstate_register(NULL, -1, &vmstate_pcibus, bus); -} - -PCIBus *pci_bus_new(DeviceState *parent, const char *name, - MemoryRegion *address_space_mem, - MemoryRegion *address_space_io, - uint8_t devfn_min) -{ - PCIBus *bus; - bus = g_malloc0(sizeof(*bus)); - bus->qbus.qdev_allocated = 1; - pci_bus_new_inplace(bus, parent, name, address_space_mem, - address_space_io, devfn_min); return bus; } diff --git a/hw/pci.h b/hw/pci.h index c3cacce..7eaf90b 100644 --- a/hw/pci.h +++ b/hw/pci.h @@ -285,11 +285,6 @@ typedef enum { typedef int (*pci_hotplug_fn)(DeviceState *qdev, PCIDevice *pci_dev, PCIHotplugState state); -void pci_bus_new_inplace(PCIBus *bus, DeviceState *parent, - const char *name, - MemoryRegion *address_space_mem, - MemoryRegion *address_space_io, - uint8_t devfn_min); PCIBus *pci_bus_new(DeviceState *parent, const char *name, MemoryRegion *address_space_mem, MemoryRegion *address_space_io, -- 1.7.3.4