]> git.proxmox.com Git - mirror_qemu.git/blobdiff - hw/net/lasi_i82596.c
qdev: Convert uses of qdev_create() with Coccinelle
[mirror_qemu.git] / hw / net / lasi_i82596.c
index 5e0fd69763bad914fac9d6513a07ff7ac1bfaf59..1870507727d39bdc2d86f9b645652dbfbb2d5dbd 100644 (file)
@@ -11,6 +11,7 @@
  */
 
 #include "qemu/osdep.h"
+#include "qapi/error.h"
 #include "qemu/timer.h"
 #include "hw/sysbus.h"
 #include "net/eth.h"
@@ -126,11 +127,11 @@ SysBusI82596State *lasi_82596_init(MemoryRegion *addr_space,
         .a = { 0x08, 0x00, 0x09, 0xef, 0x34, 0xf6 } };
 
     qemu_check_nic_model(&nd_table[0], TYPE_LASI_82596);
-    dev = qdev_create(NULL, TYPE_LASI_82596);
+    dev = qdev_new(TYPE_LASI_82596);
     s = SYSBUS_I82596(dev);
     s->state.irq = lan_irq;
     qdev_set_nic_properties(dev, &nd_table[0]);
-    qdev_init_nofail(dev);
+    qdev_realize_and_unref(dev, NULL, &error_fatal);
     s->state.conf.macaddr = HP_MAC; /* set HP MAC prefix */
 
     /* LASI 82596 ports in main memory. */