aboutsummaryrefslogtreecommitdiff
path: root/hw/rtc/m48t59.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/rtc/m48t59.c')
-rw-r--r--hw/rtc/m48t59.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/hw/rtc/m48t59.c b/hw/rtc/m48t59.c
index 47d4805..f6acf41 100644
--- a/hw/rtc/m48t59.c
+++ b/hw/rtc/m48t59.c
@@ -33,6 +33,7 @@
#include "sysemu/sysemu.h"
#include "hw/sysbus.h"
#include "exec/address-spaces.h"
+#include "qapi/error.h"
#include "qemu/bcd.h"
#include "qemu/module.h"
#include "trace.h"
@@ -579,9 +580,9 @@ Nvram *m48t59_init(qemu_irq IRQ, hwaddr mem_base,
continue;
}
- dev = qdev_create(NULL, m48txx_sysbus_info[i].bus_name);
+ dev = qdev_new(m48txx_sysbus_info[i].bus_name);
qdev_prop_set_int32(dev, "base-year", base_year);
- qdev_init_nofail(dev);
+ qdev_realize_and_unref(dev, NULL, &error_fatal);
s = SYS_BUS_DEVICE(dev);
sysbus_connect_irq(s, 0, IRQ);
if (io_base != 0) {