summaryrefslogtreecommitdiff
path: root/hw/arm/musca.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/arm/musca.c')
-rw-r--r--hw/arm/musca.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/hw/arm/musca.c b/hw/arm/musca.c
index cd7df7c191..b7f1c4e128 100644
--- a/hw/arm/musca.c
+++ b/hw/arm/musca.c
@@ -142,8 +142,7 @@ static MemoryRegion *make_unimp_dev(MuscaMachineState *mms,
*/
UnimplementedDeviceState *uds = opaque;
- sysbus_init_child_obj(OBJECT(mms), name, uds,
- sizeof(UnimplementedDeviceState),
+ sysbus_init_child_obj(OBJECT(mms), name, uds, sizeof(*uds),
TYPE_UNIMPLEMENTED_DEVICE);
qdev_prop_set_string(DEVICE(uds), "name", name);
qdev_prop_set_uint64(DEVICE(uds), "size", size);
@@ -246,8 +245,7 @@ static MemoryRegion *make_mpc(MuscaMachineState *mms, void *opaque,
case MPC_CRYPTOISLAND:
/* We don't implement the CryptoIsland yet */
uds = &mms->cryptoisland;
- sysbus_init_child_obj(OBJECT(mms), name, uds,
- sizeof(UnimplementedDeviceState),
+ sysbus_init_child_obj(OBJECT(mms), name, uds, sizeof(*uds),
TYPE_UNIMPLEMENTED_DEVICE);
qdev_prop_set_string(DEVICE(uds), "name", mpcinfo[i].name);
qdev_prop_set_uint64(DEVICE(uds), "size", mpcinfo[i].size);
@@ -535,7 +533,7 @@ static void musca_init(MachineState *machine)
char *gpioname;
sysbus_init_child_obj(OBJECT(machine), ppcinfo->name, ppc,
- sizeof(TZPPC), TYPE_TZ_PPC);
+ sizeof(*ppc), TYPE_TZ_PPC);
ppcdev = DEVICE(ppc);
for (port = 0; port < TZ_NUM_PORTS; port++) {