aboutsummaryrefslogtreecommitdiff
path: root/hw/pci-bridge/dec.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/pci-bridge/dec.c')
-rw-r--r--hw/pci-bridge/dec.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/hw/pci-bridge/dec.c b/hw/pci-bridge/dec.c
index 952bc71122..677a310b96 100644
--- a/hw/pci-bridge/dec.c
+++ b/hw/pci-bridge/dec.c
@@ -26,6 +26,7 @@
#include "qemu/osdep.h"
#include "dec.h"
#include "hw/sysbus.h"
+#include "qapi/error.h"
#include "qemu/module.h"
#include "hw/pci/pci.h"
#include "hw/pci/pci_host.h"
@@ -81,11 +82,10 @@ PCIBus *pci_dec_21154_init(PCIBus *parent_bus, int devfn)
PCIDevice *dev;
PCIBridge *br;
- dev = pci_create_multifunction(parent_bus, devfn, false,
- "dec-21154-p2p-bridge");
+ dev = pci_new_multifunction(devfn, false, "dec-21154-p2p-bridge");
br = PCI_BRIDGE(dev);
pci_bridge_map_irq(br, "DEC 21154 PCI-PCI bridge", dec_map_irq);
- qdev_init_nofail(&dev->qdev);
+ pci_realize_and_unref(dev, parent_bus, &error_fatal);
return pci_bridge_get_sec_bus(br);
}