summaryrefslogtreecommitdiffstats
path: root/hw/display/sm501.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/display/sm501.c')
-rw-r--r--hw/display/sm501.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/display/sm501.c b/hw/display/sm501.c
index 80da8575fe..a7fc08c52b 100644
--- a/hw/display/sm501.c
+++ b/hw/display/sm501.c
@@ -1977,7 +1977,7 @@ static void sm501_realize_sysbus(DeviceState *dev, Error **errp)
sysbus_pass_irq(sbd, SYS_BUS_DEVICE(usb_dev));
/* bridge to serial emulation module */
- qdev_init_nofail(DEVICE(&s->serial));
+ sysbus_realize(SYS_BUS_DEVICE(&s->serial), &error_fatal);
mr = sysbus_mmio_get_region(SYS_BUS_DEVICE(&s->serial), 0);
memory_region_add_subregion(&s->state.mmio_region, SM501_UART0, mr);
/* TODO : chain irq to IRL */
@@ -2023,7 +2023,7 @@ static void sm501_sysbus_init(Object *o)
SM501SysBusState *sm501 = SYSBUS_SM501(o);
SerialMM *smm = &sm501->serial;
- sysbus_init_child_obj(o, "serial", smm, sizeof(*smm), TYPE_SERIAL_MM);
+ object_initialize_child(o, "serial", smm, TYPE_SERIAL_MM);
qdev_set_legacy_instance_id(DEVICE(smm), SM501_UART0, 2);
qdev_prop_set_uint8(DEVICE(smm), "regshift", 2);
qdev_prop_set_uint8(DEVICE(smm), "endianness", DEVICE_LITTLE_ENDIAN);