From 56a14938809331372b6cdb2afcb14d9818de4cbf Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Fri, 25 Sep 2009 21:42:46 +0200 Subject: drive cleanup fixes. Changes: * drive_uninit() wants a DriveInfo now. * drive_uninit() also calls bdrv_delete(), so callers don't need to do that. * drive_uninit() calls are moved over to the ->exit() callbacks, destroy_bdrvs() is zapped. * setting bdrv->private is not needed any more as the only user (destroy_bdrvs) is gone. * usb-storage needs no drive_uninit, scsi-disk will handle that. Signed-off-by: Gerd Hoffmann Signed-off-by: Anthony Liguori --- hw/scsi-generic.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'hw/scsi-generic.c') diff --git a/hw/scsi-generic.c b/hw/scsi-generic.c index 86d1e54a5f..6a89989996 100644 --- a/hw/scsi-generic.c +++ b/hw/scsi-generic.c @@ -668,6 +668,8 @@ static void scsi_destroy(SCSIDevice *d) qemu_free(r); r = n; } + + drive_uninit(s->dinfo); } static int scsi_generic_initfn(SCSIDevice *dev) -- cgit 1.4.1