aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorHu Tao <hutao@cn.fujitsu.com>2013-07-01 18:18:39 +0800
committerAndreas Färber <afaerber@suse.de>2013-07-23 00:37:35 +0200
commit913bc63844395f07e317dbc1a5b38612cc75ebec (patch)
tree255ff0f7feb5778ea981432b4629c15877322258 /hw
parent726887ef44d5a822cd76e4fedd269b038869b698 (diff)
kvm/clock: Use QOM realize for kvmclock
Signed-off-by: Hu Tao <hutao@cn.fujitsu.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'hw')
-rw-r--r--hw/i386/kvm/clock.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/hw/i386/kvm/clock.c b/hw/i386/kvm/clock.c
index 62654584d6..e89e2f768e 100644
--- a/hw/i386/kvm/clock.c
+++ b/hw/i386/kvm/clock.c
@@ -91,12 +91,11 @@ static void kvmclock_vm_state_change(void *opaque, int running,
}
}
-static int kvmclock_init(SysBusDevice *dev)
+static void kvmclock_realize(DeviceState *dev, Error **errp)
{
KVMClockState *s = KVM_CLOCK(dev);
qemu_add_vm_change_state_handler(kvmclock_vm_state_change, s);
- return 0;
}
static const VMStateDescription kvmclock_vmsd = {
@@ -113,9 +112,8 @@ static const VMStateDescription kvmclock_vmsd = {
static void kvmclock_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
- SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
- k->init = kvmclock_init;
+ dc->realize = kvmclock_realize;
dc->no_user = 1;
dc->vmsd = &kvmclock_vmsd;
}