diff options
Diffstat (limited to 'drivers/usb/core/hcd.c')
-rw-r--r-- | drivers/usb/core/hcd.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c index b26c19e8d19..af7aed11398 100644 --- a/drivers/usb/core/hcd.c +++ b/drivers/usb/core/hcd.c | |||
@@ -544,6 +544,8 @@ void usb_hcd_poll_rh_status(struct usb_hcd *hcd) | |||
544 | unsigned long flags; | 544 | unsigned long flags; |
545 | char buffer[4]; /* Any root hubs with > 31 ports? */ | 545 | char buffer[4]; /* Any root hubs with > 31 ports? */ |
546 | 546 | ||
547 | if (unlikely(!hcd->rh_registered)) | ||
548 | return; | ||
547 | if (!hcd->uses_new_polling && !hcd->status_urb) | 549 | if (!hcd->uses_new_polling && !hcd->status_urb) |
548 | return; | 550 | return; |
549 | 551 | ||
@@ -1670,12 +1672,12 @@ void usb_remove_hcd(struct usb_hcd *hcd) | |||
1670 | usb_disconnect(&hcd->self.root_hub); | 1672 | usb_disconnect(&hcd->self.root_hub); |
1671 | mutex_unlock(&usb_bus_list_lock); | 1673 | mutex_unlock(&usb_bus_list_lock); |
1672 | 1674 | ||
1673 | hcd->poll_rh = 0; | ||
1674 | del_timer_sync(&hcd->rh_timer); | ||
1675 | |||
1676 | hcd->driver->stop(hcd); | 1675 | hcd->driver->stop(hcd); |
1677 | hcd->state = HC_STATE_HALT; | 1676 | hcd->state = HC_STATE_HALT; |
1678 | 1677 | ||
1678 | hcd->poll_rh = 0; | ||
1679 | del_timer_sync(&hcd->rh_timer); | ||
1680 | |||
1679 | if (hcd->irq >= 0) | 1681 | if (hcd->irq >= 0) |
1680 | free_irq(hcd->irq, hcd); | 1682 | free_irq(hcd->irq, hcd); |
1681 | usb_deregister_bus(&hcd->self); | 1683 | usb_deregister_bus(&hcd->self); |