aboutsummaryrefslogtreecommitdiff
path: root/hw/char/virtio-serial-bus.c
diff options
context:
space:
mode:
authorAndreas Färber <afaerber@suse.de>2013-07-30 03:50:44 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2013-12-09 21:46:49 +0100
commit306ec6c3cece7004429c79c1ac93d49919f1f1cc (patch)
treedbd5a39523f0ee96d77f235c12e6dcd7de5426a6 /hw/char/virtio-serial-bus.c
parent0ba94b6f94a5b0bed9f125ce4c3348adc83db5de (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/char/virtio-serial-bus.c')
-rw-r--r--hw/char/virtio-serial-bus.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/hw/char/virtio-serial-bus.c b/hw/char/virtio-serial-bus.c
index df9611703a..226e9f9a3c 100644
--- a/hw/char/virtio-serial-bus.c
+++ b/hw/char/virtio-serial-bus.c
@@ -988,11 +988,12 @@ static const TypeInfo virtio_serial_port_type_info = {
.class_init = virtio_serial_port_class_init,
};
-static void virtio_serial_device_exit(VirtIODevice *vdev)
+static void virtio_serial_device_unrealize(DeviceState *dev, Error **errp)
{
- VirtIOSerial *vser = VIRTIO_SERIAL(vdev);
+ VirtIODevice *vdev = VIRTIO_DEVICE(dev);
+ VirtIOSerial *vser = VIRTIO_SERIAL(dev);
- unregister_savevm(DEVICE(vdev), "virtio-console", vser);
+ unregister_savevm(dev, "virtio-console", vser);
g_free(vser->ivqs);
g_free(vser->ovqs);
@@ -1019,7 +1020,7 @@ static void virtio_serial_class_init(ObjectClass *klass, void *data)
dc->props = virtio_serial_properties;
set_bit(DEVICE_CATEGORY_INPUT, dc->categories);
vdc->realize = virtio_serial_device_realize;
- vdc->exit = virtio_serial_device_exit;
+ vdc->unrealize = virtio_serial_device_unrealize;
vdc->get_features = get_features;
vdc->get_config = get_config;
vdc->set_config = set_config;