summaryrefslogtreecommitdiff
path: root/hw/rtc/sun4v-rtc.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/rtc/sun4v-rtc.c')
-rw-r--r--hw/rtc/sun4v-rtc.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/hw/rtc/sun4v-rtc.c b/hw/rtc/sun4v-rtc.c
index ada01b5774..ed1c10832f 100644
--- a/hw/rtc/sun4v-rtc.c
+++ b/hw/rtc/sun4v-rtc.c
@@ -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);
}