]> git.proxmox.com Git - mirror_qemu.git/blobdiff - hw/rtc/sun4v-rtc.c
qdev: Convert uses of qdev_create() with Coccinelle
[mirror_qemu.git] / hw / rtc / sun4v-rtc.c
index ada01b57748bfc2dfebf2e21b6f4344d22479040..ed1c10832f9077769a94c9f74412553d5a0c563a 100644 (file)
@@ -11,6 +11,7 @@
 
 #include "qemu/osdep.h"
 #include "hw/sysbus.h"
+#include "qapi/error.h"
 #include "qemu/module.h"
 #include "qemu/timer.h"
 #include "hw/rtc/sun4v-rtc.h"
@@ -55,10 +56,10 @@ void sun4v_rtc_init(hwaddr addr)
     DeviceState *dev;
     SysBusDevice *s;
 
-    dev = qdev_create(NULL, TYPE_SUN4V_RTC);
+    dev = qdev_new(TYPE_SUN4V_RTC);
     s = SYS_BUS_DEVICE(dev);
 
-    qdev_init_nofail(dev);
+    qdev_realize_and_unref(dev, NULL, &error_fatal);
 
     sysbus_mmio_map(s, 0, addr);
 }