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/scsi/vhost-scsi.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/scsi/vhost-scsi.c')
-rw-r--r-- | hw/scsi/vhost-scsi.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/hw/scsi/vhost-scsi.c b/hw/scsi/vhost-scsi.c index 1f1c9f3421..3983a5b464 100644 --- a/hw/scsi/vhost-scsi.c +++ b/hw/scsi/vhost-scsi.c @@ -240,10 +240,10 @@ static void vhost_scsi_realize(DeviceState *dev, Error **errp) migrate_add_blocker(s->migration_blocker); } -static void vhost_scsi_exit(VirtIODevice *vdev) +static void vhost_scsi_unrealize(DeviceState *dev, Error **errp) { - VHostSCSI *s = VHOST_SCSI(vdev); - VirtIOSCSICommon *vs = VIRTIO_SCSI_COMMON(vdev); + VirtIODevice *vdev = VIRTIO_DEVICE(dev); + VHostSCSI *s = VHOST_SCSI(dev); migrate_del_blocker(s->migration_blocker); error_free(s->migration_blocker); @@ -252,7 +252,8 @@ static void vhost_scsi_exit(VirtIODevice *vdev) vhost_scsi_set_status(vdev, 0); g_free(s->dev.vqs); - virtio_scsi_common_exit(vs); + + virtio_scsi_common_unrealize(dev, errp); } static Property vhost_scsi_properties[] = { @@ -268,7 +269,7 @@ static void vhost_scsi_class_init(ObjectClass *klass, void *data) dc->props = vhost_scsi_properties; set_bit(DEVICE_CATEGORY_STORAGE, dc->categories); vdc->realize = vhost_scsi_realize; - vdc->exit = vhost_scsi_exit; + vdc->unrealize = vhost_scsi_unrealize; vdc->get_features = vhost_scsi_get_features; vdc->set_config = vhost_scsi_set_config; vdc->set_status = vhost_scsi_set_status; |