diff options
author | Gerd Hoffmann | 2009-09-25 21:42:39 +0200 |
---|---|---|
committer | Anthony Liguori | 2009-10-05 16:32:48 +0200 |
commit | a8e662b5477a7e3659c7fc2d83db50c42b201c1d (patch) | |
tree | 12dcfa0a4ef0960eec14ff44b772c8e0a5e80061 /hw/usb.h | |
parent | pci: move unregister from PCIDevice to PCIDeviceInfo (diff) | |
download | qemu-a8e662b5477a7e3659c7fc2d83db50c42b201c1d.tar.gz qemu-a8e662b5477a7e3659c7fc2d83db50c42b201c1d.tar.xz qemu-a8e662b5477a7e3659c7fc2d83db50c42b201c1d.zip |
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>
Diffstat (limited to 'hw/usb.h')
-rw-r--r-- | hw/usb.h | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -311,7 +311,9 @@ USBDevice *usb_create(USBBus *bus, const char *name); USBDevice *usb_create_simple(USBBus *bus, const char *name); void usb_register_port(USBBus *bus, USBPort *port, void *opaque, int index, usb_attachfn attach); +void usb_unregister_port(USBBus *bus, USBPort *port); int usb_device_attach(USBDevice *dev); +int usb_device_detach(USBDevice *dev); int usb_device_delete_addr(int busnr, int addr); static inline USBBus *usb_bus_from_device(USBDevice *d) |