summary refs log tree commit diff stats
path: root/hw/rtc/m48t59.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/rtc/m48t59.c')
-rw-r--r--hw/rtc/m48t59.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/rtc/m48t59.c b/hw/rtc/m48t59.c
index f6acf416ff..b428a06045 100644
--- a/hw/rtc/m48t59.c
+++ b/hw/rtc/m48t59.c
@@ -582,8 +582,8 @@ Nvram *m48t59_init(qemu_irq IRQ, hwaddr mem_base,
 
         dev = qdev_new(m48txx_sysbus_info[i].bus_name);
         qdev_prop_set_int32(dev, "base-year", base_year);
-        qdev_realize_and_unref(dev, NULL, &error_fatal);
         s = SYS_BUS_DEVICE(dev);
+        sysbus_realize_and_unref(s, &error_fatal);
         sysbus_connect_irq(s, 0, IRQ);
         if (io_base != 0) {
             memory_region_add_subregion(get_system_io(), io_base,