The DeviceState *mptimer var in a9mp_priv_state was only used by the init function and had no reason for persistence. Made a local variable and removed from state struct.
Signed-off-by: Peter Crosthwaite <peter.crosthwa...@xilinx.com> --- hw/a9mpcore.c | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/hw/a9mpcore.c b/hw/a9mpcore.c index 673bbd8..1f6c985 100644 --- a/hw/a9mpcore.c +++ b/hw/a9mpcore.c @@ -20,7 +20,6 @@ typedef struct a9mp_priv_state { uint32_t num_cpu; MemoryRegion scu_iomem; MemoryRegion container; - DeviceState *mptimer; DeviceState *gic; uint32_t num_irq; } a9mp_priv_state; @@ -130,6 +129,7 @@ static int a9mp_priv_init(SysBusDevice *dev) { a9mp_priv_state *s = FROM_SYSBUS(a9mp_priv_state, dev); SysBusDevice *busdev, *gicbusdev; + DeviceState *qdev; int i; s->gic = qdev_create(NULL, "arm_gic"); @@ -144,10 +144,10 @@ static int a9mp_priv_init(SysBusDevice *dev) /* Pass through inbound GPIO lines to the GIC */ qdev_init_gpio_in(&s->busdev.qdev, a9mp_priv_set_irq, s->num_irq - 32); - s->mptimer = qdev_create(NULL, "arm_mptimer"); - qdev_prop_set_uint32(s->mptimer, "num-cpu", s->num_cpu); - qdev_init_nofail(s->mptimer); - busdev = SYS_BUS_DEVICE(s->mptimer); + qdev = qdev_create(NULL, "arm_mptimer"); + qdev_prop_set_uint32(qdev, "num-cpu", s->num_cpu); + qdev_init_nofail(qdev); + busdev = SYS_BUS_DEVICE(qdev); /* Memory map (addresses are offsets from PERIPHBASE): * 0x0000-0x00ff -- Snoop Control Unit -- 1.7.0.4