diff options
-rw-r--r-- | hw/usb/bus.c | 7 | ||||
-rw-r--r-- | include/hw/usb.h | 1 |
2 files changed, 8 insertions, 0 deletions
diff --git a/hw/usb/bus.c b/hw/usb/bus.c index 516fb52993..c7c4dadedd 100644 --- a/hw/usb/bus.c +++ b/hw/usb/bus.c @@ -87,6 +87,13 @@ void usb_bus_new(USBBus *bus, size_t bus_size, QTAILQ_INSERT_TAIL(&busses, bus, next); } +void usb_bus_release(USBBus *bus) +{ + assert(next_usb_bus > 0); + + QTAILQ_REMOVE(&busses, bus, next); +} + USBBus *usb_bus_find(int busnr) { USBBus *bus; diff --git a/include/hw/usb.h b/include/hw/usb.h index 223a5aef8f..6b32a3bb70 100644 --- a/include/hw/usb.h +++ b/include/hw/usb.h @@ -529,6 +529,7 @@ struct USBBusOps { void usb_bus_new(USBBus *bus, size_t bus_size, USBBusOps *ops, DeviceState *host); +void usb_bus_release(USBBus *bus); USBBus *usb_bus_find(int busnr); void usb_legacy_register(const char *typename, const char *usbdevice_name, USBDevice *(*usbdevice_init)(USBBus *bus, |