usb: hook unplug into qdev, cleanups + fixes.
authorGerd Hoffmann <kraxel@redhat.com>
Fri, 25 Sep 2009 19:42:39 +0000 (21:42 +0200)
committerAnthony Liguori <aliguori@us.ibm.com>
Mon, 5 Oct 2009 14:32:48 +0000 (09:32 -0500)
commit93f23e16653c0c21711fddecdbc4d8d821204840
tree12dcfa0a4ef0960eec14ff44b772c8e0a5e80061
parent3b5cb3619d817150a446396716824cabadc5409b
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 <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
hw/usb-bt.c
hw/usb-bus.c
hw/usb-hid.c
hw/usb-hub.c
hw/usb-msd.c
hw/usb-serial.c
hw/usb-wacom.c
hw/usb.h