diff options
Diffstat (limited to 'hw/arm/musca.c')
-rw-r--r-- | hw/arm/musca.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/hw/arm/musca.c b/hw/arm/musca.c index b7f1c4e128..a1a6e887ed 100644 --- a/hw/arm/musca.c +++ b/hw/arm/musca.c @@ -256,7 +256,7 @@ static MemoryRegion *make_mpc(MuscaMachineState *mms, void *opaque, g_assert_not_reached(); } - sysbus_init_child_obj(OBJECT(mms), mpcname, mpc, sizeof(mms->mpc[0]), + sysbus_init_child_obj(OBJECT(mms), mpcname, mpc, sizeof(*mpc), TYPE_TZ_MPC); object_property_set_link(OBJECT(mpc), OBJECT(downstream), "downstream", &error_fatal); @@ -279,7 +279,7 @@ static MemoryRegion *make_rtc(MuscaMachineState *mms, void *opaque, { PL031State *rtc = opaque; - sysbus_init_child_obj(OBJECT(mms), name, rtc, sizeof(mms->rtc), TYPE_PL031); + sysbus_init_child_obj(OBJECT(mms), name, rtc, sizeof(*rtc), TYPE_PL031); object_property_set_bool(OBJECT(rtc), true, "realized", &error_fatal); sysbus_connect_irq(SYS_BUS_DEVICE(rtc), 0, get_sse_irq_in(mms, 39)); return sysbus_mmio_get_region(SYS_BUS_DEVICE(rtc), 0); @@ -293,8 +293,7 @@ static MemoryRegion *make_uart(MuscaMachineState *mms, void *opaque, int irqbase = 7 + i * 6; SysBusDevice *s; - sysbus_init_child_obj(OBJECT(mms), name, uart, sizeof(mms->uart[0]), - TYPE_PL011); + sysbus_init_child_obj(OBJECT(mms), name, uart, sizeof(*uart), TYPE_PL011); qdev_prop_set_chr(DEVICE(uart), "chardev", serial_hd(i)); object_property_set_bool(OBJECT(uart), true, "realized", &error_fatal); s = SYS_BUS_DEVICE(uart); |