diff options
Diffstat (limited to 'drivers/usb/musb/musb_core.c')
-rw-r--r-- | drivers/usb/musb/musb_core.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c index 56cf0243979e..3d11cf64ebd1 100644 --- a/drivers/usb/musb/musb_core.c +++ b/drivers/usb/musb/musb_core.c | |||
@@ -981,6 +981,9 @@ static void musb_shutdown(struct platform_device *pdev) | |||
981 | unsigned long flags; | 981 | unsigned long flags; |
982 | 982 | ||
983 | pm_runtime_get_sync(musb->controller); | 983 | pm_runtime_get_sync(musb->controller); |
984 | |||
985 | musb_gadget_cleanup(musb); | ||
986 | |||
984 | spin_lock_irqsave(&musb->lock, flags); | 987 | spin_lock_irqsave(&musb->lock, flags); |
985 | musb_platform_disable(musb); | 988 | musb_platform_disable(musb); |
986 | musb_generic_disable(musb); | 989 | musb_generic_disable(musb); |
@@ -1827,8 +1830,6 @@ static void musb_free(struct musb *musb) | |||
1827 | sysfs_remove_group(&musb->controller->kobj, &musb_attr_group); | 1830 | sysfs_remove_group(&musb->controller->kobj, &musb_attr_group); |
1828 | #endif | 1831 | #endif |
1829 | 1832 | ||
1830 | musb_gadget_cleanup(musb); | ||
1831 | |||
1832 | if (musb->nIrq >= 0) { | 1833 | if (musb->nIrq >= 0) { |
1833 | if (musb->irq_wake) | 1834 | if (musb->irq_wake) |
1834 | disable_irq_wake(musb->nIrq); | 1835 | disable_irq_wake(musb->nIrq); |