aboutsummaryrefslogtreecommitdiff
path: root/hw/display
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2020-06-10 07:32:38 +0200
committerMarkus Armbruster <armbru@redhat.com>2020-06-15 22:06:04 +0200
commit5a147c8c51d42fcdf5befc2982715b4b407f612e (patch)
tree74c0340ac0e1d8cc99dab09f08db45e5ea6bab37 /hw/display
parentdb873cc5d1a4aaa67eea87768d504b2f89d88738 (diff)
sysbus: Convert qdev_set_parent_bus() use with Coccinelle, part 3
These are init/realize pairs produced by the previous commit's Coccinelle script where the argument test doesn't quite match. They need even more careful review. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Message-Id: <20200610053247.1583243-50-armbru@redhat.com>
Diffstat (limited to 'hw/display')
-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);