From a8e662b5477a7e3659c7fc2d83db50c42b201c1d Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Fri, 25 Sep 2009 21:42:39 +0200 Subject: usb: hook unplug into qdev, cleanups + fixes. Hook into DeviceInfo->exit(). handle_destroy() must not free the state struct, this is handled by the new usb_qdev_exit() function now. qdev_free(usb_device) works now. Fix usb hub to qdev_free() all connected devices on unplug. Unplugging a usb hub works now. Signed-off-by: Gerd Hoffmann Signed-off-by: Anthony Liguori --- hw/usb-hid.c | 1 - 1 file changed, 1 deletion(-) (limited to 'hw/usb-hid.c') diff --git a/hw/usb-hid.c b/hw/usb-hid.c index 3bf06fa..d1cc45e 100644 --- a/hw/usb-hid.c +++ b/hw/usb-hid.c @@ -843,7 +843,6 @@ static void usb_hid_handle_destroy(USBDevice *dev) if (s->kind != USB_KEYBOARD) qemu_remove_mouse_event_handler(s->ptr.eh_entry); /* TODO: else */ - qemu_free(s); } static int usb_hid_initfn(USBDevice *dev, int kind) -- cgit v1.1