diff options
-rw-r--r-- | drivers/usb/musb/musb_core.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c index c9f9024c5515..2f42a5d50a5a 100644 --- a/drivers/usb/musb/musb_core.c +++ b/drivers/usb/musb/musb_core.c | |||
@@ -1052,6 +1052,12 @@ static void musb_shutdown(struct platform_device *pdev) | |||
1052 | clk_put(musb->clock); | 1052 | clk_put(musb->clock); |
1053 | spin_unlock_irqrestore(&musb->lock, flags); | 1053 | spin_unlock_irqrestore(&musb->lock, flags); |
1054 | 1054 | ||
1055 | if (!is_otg_enabled(musb) && is_host_enabled(musb)) | ||
1056 | usb_remove_hcd(musb_to_hcd(musb)); | ||
1057 | musb_writeb(musb->mregs, MUSB_DEVCTL, 0); | ||
1058 | musb_platform_exit(musb); | ||
1059 | musb_writeb(musb->mregs, MUSB_DEVCTL, 0); | ||
1060 | |||
1055 | /* FIXME power down */ | 1061 | /* FIXME power down */ |
1056 | } | 1062 | } |
1057 | 1063 | ||
@@ -2244,13 +2250,6 @@ static int __exit musb_remove(struct platform_device *pdev) | |||
2244 | */ | 2250 | */ |
2245 | musb_exit_debugfs(musb); | 2251 | musb_exit_debugfs(musb); |
2246 | musb_shutdown(pdev); | 2252 | musb_shutdown(pdev); |
2247 | #ifdef CONFIG_USB_MUSB_HDRC_HCD | ||
2248 | if (musb->board_mode == MUSB_HOST) | ||
2249 | usb_remove_hcd(musb_to_hcd(musb)); | ||
2250 | #endif | ||
2251 | musb_writeb(musb->mregs, MUSB_DEVCTL, 0); | ||
2252 | musb_platform_exit(musb); | ||
2253 | musb_writeb(musb->mregs, MUSB_DEVCTL, 0); | ||
2254 | 2253 | ||
2255 | musb_free(musb); | 2254 | musb_free(musb); |
2256 | iounmap(ctrl_base); | 2255 | iounmap(ctrl_base); |