diff options
author | Andreas Färber <afaerber@suse.de> | 2013-07-30 03:50:44 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2013-12-09 21:46:49 +0100 |
commit | 306ec6c3cece7004429c79c1ac93d49919f1f1cc (patch) | |
tree | dbd5a39523f0ee96d77f235c12e6dcd7de5426a6 /hw/virtio/virtio-rng.c | |
parent | 0ba94b6f94a5b0bed9f125ce4c3348adc83db5de (diff) |
virtio: Convert exit to unrealize
Signed-off-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/virtio/virtio-rng.c')
-rw-r--r-- | hw/virtio/virtio-rng.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/hw/virtio/virtio-rng.c b/hw/virtio/virtio-rng.c index fd61cb2edf..755fdee628 100644 --- a/hw/virtio/virtio-rng.c +++ b/hw/virtio/virtio-rng.c @@ -187,13 +187,14 @@ static void virtio_rng_device_realize(DeviceState *dev, Error **errp) virtio_rng_load, vrng); } -static void virtio_rng_device_exit(VirtIODevice *vdev) +static void virtio_rng_device_unrealize(DeviceState *dev, Error **errp) { - VirtIORNG *vrng = VIRTIO_RNG(vdev); + VirtIODevice *vdev = VIRTIO_DEVICE(dev); + VirtIORNG *vrng = VIRTIO_RNG(dev); timer_del(vrng->rate_limit_timer); timer_free(vrng->rate_limit_timer); - unregister_savevm(DEVICE(vdev), "virtio-rng", vrng); + unregister_savevm(dev, "virtio-rng", vrng); virtio_cleanup(vdev); } @@ -210,7 +211,7 @@ static void virtio_rng_class_init(ObjectClass *klass, void *data) dc->props = virtio_rng_properties; set_bit(DEVICE_CATEGORY_MISC, dc->categories); vdc->realize = virtio_rng_device_realize; - vdc->exit = virtio_rng_device_exit; + vdc->unrealize = virtio_rng_device_unrealize; vdc->get_features = get_features; } |