Commit 94e46a4f authored by Merlijn Wajer's avatar Merlijn Wajer Committed by Greg Kroah-Hartman

usb: musb: Fix external abort in musb_remove on omap2430

This fixes an oops on unbind / module unload (on the musb omap2430
platform).

musb_remove function now calls musb_platform_exit before disabling
runtime pm.
Signed-off-by: default avatarMerlijn Wajer <merlijn@wizzup.org>
Signed-off-by: default avatarBin Liu <b-liu@ti.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 914a020d
...@@ -2473,11 +2473,11 @@ static int musb_remove(struct platform_device *pdev) ...@@ -2473,11 +2473,11 @@ static int musb_remove(struct platform_device *pdev)
musb_disable_interrupts(musb); musb_disable_interrupts(musb);
musb_writeb(musb->mregs, MUSB_DEVCTL, 0); musb_writeb(musb->mregs, MUSB_DEVCTL, 0);
spin_unlock_irqrestore(&musb->lock, flags); spin_unlock_irqrestore(&musb->lock, flags);
musb_platform_exit(musb);
pm_runtime_dont_use_autosuspend(musb->controller); pm_runtime_dont_use_autosuspend(musb->controller);
pm_runtime_put_sync(musb->controller); pm_runtime_put_sync(musb->controller);
pm_runtime_disable(musb->controller); pm_runtime_disable(musb->controller);
musb_platform_exit(musb);
musb_phy_callback = NULL; musb_phy_callback = NULL;
if (musb->dma_controller) if (musb->dma_controller)
musb_dma_controller_destroy(musb->dma_controller); musb_dma_controller_destroy(musb->dma_controller);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment