aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorxiaoqiang.zhao <zxq_yx_007@163.com>2016-02-18 14:16:20 +0000
committerPeter Maydell <peter.maydell@linaro.org>2016-02-18 14:50:50 +0000
commitd712a5a2a473ca545e967d8fb07a9ed4080c98d0 (patch)
tree328244566cae6044fb1f80152d2c6d57972990df
parent0d175e745f91fe2177f634676c34d450fd66e518 (diff)
downloadqemu-d712a5a2a473ca545e967d8fb07a9ed4080c98d0.zip
qemu-d712a5a2a473ca545e967d8fb07a9ed4080c98d0.tar.gz
qemu-d712a5a2a473ca545e967d8fb07a9ed4080c98d0.tar.bz2
hw/timer: QOM'ify arm_timer (pass 2)
assign DeviceClass::vmsd instead of using vmstate_register function Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: xiaoqiang zhao <zxq_yx_007@163.com> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
-rw-r--r--hw/timer/arm_timer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/timer/arm_timer.c b/hw/timer/arm_timer.c
index 5bd2d75..f1ede5f 100644
--- a/hw/timer/arm_timer.c
+++ b/hw/timer/arm_timer.c
@@ -296,7 +296,6 @@ static void sp804_realize(DeviceState *dev, Error **errp)
s->timer[1] = arm_timer_init(s->freq1);
s->timer[0]->irq = qemu_allocate_irq(sp804_set_irq, s, 0);
s->timer[1]->irq = qemu_allocate_irq(sp804_set_irq, s, 1);
- vmstate_register(dev, -1, &vmstate_sp804, s);
}
/* Integrator/CP timer module. */
@@ -390,6 +389,7 @@ static void sp804_class_init(ObjectClass *klass, void *data)
k->realize = sp804_realize;
k->props = sp804_properties;
+ k->vmsd = &vmstate_sp804;
}
static const TypeInfo sp804_info = {