提交 d712a5a2 编写于 作者: X xiaoqiang.zhao 提交者: Peter Maydell

hw/timer: QOM'ify arm_timer (pass 2)

assign DeviceClass::vmsd instead of using vmstate_register function
Reviewed-by: NPeter Maydell <peter.maydell@linaro.org>
Signed-off-by: Nxiaoqiang zhao <zxq_yx_007@163.com>
Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
上级 0d175e74
......@@ -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 = {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册