]> git.proxmox.com Git - mirror_qemu.git/blobdiff - hw/pci-host/i440fx.c
qdev: Convert uses of qdev_create() with Coccinelle
[mirror_qemu.git] / hw / pci-host / i440fx.c
index aefb416c8fce9f7eb1bcdd6e8eb66723dfa883f3..09c0d2f4e80cd63833a0a739f10bc105c31b8325 100644 (file)
@@ -271,13 +271,13 @@ PCIBus *i440fx_init(const char *host_type, const char *pci_type,
     unsigned i;
     I440FXState *i440fx;
 
-    dev = qdev_create(NULL, host_type);
+    dev = qdev_new(host_type);
     s = PCI_HOST_BRIDGE(dev);
     b = pci_root_bus_new(dev, NULL, pci_address_space,
                          address_space_io, 0, TYPE_PCI_BUS);
     s->bus = b;
     object_property_add_child(qdev_get_machine(), "i440fx", OBJECT(dev));
-    qdev_init_nofail(dev);
+    qdev_realize_and_unref(dev, NULL, &error_fatal);
 
     d = pci_create_simple(b, 0, pci_type);
     *pi440fx_state = I440FX_PCI_DEVICE(d);