virtio: Convert exit to unrealize

Signed-off-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
diff --git a/hw/virtio/virtio-rng.c b/hw/virtio/virtio-rng.c
index fd61cb2..755fdee 100644
--- a/hw/virtio/virtio-rng.c
+++ b/hw/virtio/virtio-rng.c
@@ -187,13 +187,14 @@
                     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 @@
     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;
 }