aboutsummaryrefslogtreecommitdiff
path: root/hw/intc/armv7m_nvic.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/intc/armv7m_nvic.c')
-rw-r--r--hw/intc/armv7m_nvic.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/hw/intc/armv7m_nvic.c b/hw/intc/armv7m_nvic.c
index 1ad35e5529..f035079168 100644
--- a/hw/intc/armv7m_nvic.c
+++ b/hw/intc/armv7m_nvic.c
@@ -2655,12 +2655,10 @@ static void armv7m_nvic_realize(DeviceState *dev, Error **errp)
* as we didn't know then if the CPU had the security extensions;
* so we have to do it here.
*/
- sysbus_init_child_obj(OBJECT(dev), "systick-reg-s",
- &s->systick[M_REG_S],
- sizeof(s->systick[M_REG_S]), TYPE_SYSTICK);
+ object_initialize_child(OBJECT(dev), "systick-reg-s",
+ &s->systick[M_REG_S], TYPE_SYSTICK);
- object_property_set_bool(OBJECT(&s->systick[M_REG_S]), true,
- "realized", &err);
+ sysbus_realize(SYS_BUS_DEVICE(&s->systick[M_REG_S]), &err);
if (err != NULL) {
error_propagate(errp, err);
return;