/* As the device removal will change the state of other devices (usb host controller, most likely interrupt controller too) we have to wait with it until  */
static void usb_host_post_load_bh(void *opaque)
/* As the device removal will change the state of other devices (usb host controller, most likely interrupt controller too) we have to wait with it until  */
static void usb_host_post_load_bh(void *opaque)
{
    USBHostDevice *dev = opaque;
    USBDevice *udev = USB_DEVICE(dev);
    if (dev->dh != NULL) {
        usb_host_close(dev);
    }
    if (udev->attached) {
        usb_device_detach(udev);
    }
    usb_host_auto_check(NULL);
}