diff options
author | John Stultz <john.stultz@linaro.org> | 2011-04-18 13:19:07 -0700 |
---|---|---|
committer | John Stultz <john.stultz@linaro.org> | 2011-04-18 13:19:07 -0700 |
commit | 775d71e49c65f1f6aa57776ea1da62988fc9a30a (patch) | |
tree | ce03cae544bacc8dda67422fd66a543dd1ae3c99 /drivers/usb/musb/musb_core.c | |
parent | 18e82d2b952ab57fc1c8a69d4fa14e562f2aecf6 (diff) | |
parent | c1a952f48517b5545075d8eb1a5d543099bd2ae1 (diff) |
Merge branch 'upstream/linaro.38' into linaro-android.38KNOWN_GOOD
Diffstat (limited to 'drivers/usb/musb/musb_core.c')
-rw-r--r-- | drivers/usb/musb/musb_core.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c index 630ae7f3cd4..a6d3f2ffe81 100644 --- a/drivers/usb/musb/musb_core.c +++ b/drivers/usb/musb/musb_core.c @@ -1030,6 +1030,8 @@ static void musb_shutdown(struct platform_device *pdev) struct musb *musb = dev_to_musb(&pdev->dev); unsigned long flags; + pm_runtime_get_sync(musb->controller); + spin_lock_irqsave(&musb->lock, flags); musb_platform_disable(musb); musb_generic_disable(musb); @@ -1040,6 +1042,8 @@ static void musb_shutdown(struct platform_device *pdev) musb_writeb(musb->mregs, MUSB_DEVCTL, 0); musb_platform_exit(musb); + pm_runtime_put(musb->controller); + /* FIXME power down */ } @@ -2197,11 +2201,9 @@ static int __exit musb_remove(struct platform_device *pdev) * - Peripheral mode: peripheral is deactivated (or never-activated) * - OTG mode: both roles are deactivated (or never-activated) */ - pm_runtime_get_sync(musb->controller); musb_exit_debugfs(musb); musb_shutdown(pdev); - pm_runtime_put(musb->controller); musb_free(musb); iounmap(ctrl_base); device_init_wakeup(&pdev->dev, 0); |