diff options
author | Andy Green <andy.green@linaro.org> | 2011-10-17 10:46:15 +0800 |
---|---|---|
committer | Andy Green <andy.green@linaro.org> | 2011-10-17 10:46:15 +0800 |
commit | f9e6deab728dad3b72665e045433f733bc3de95c (patch) | |
tree | 156f16c1b4445a19e5aa57e6fc965494b6e0d85c | |
parent | 442572b1263bca6797e11d820cbf6668686d85fd (diff) |
musb suspend runtime pm coveragetilt-android-tracking-f9e6deab728dad3b72665e045433f733bc3de95c
Signed-off-by: Andy Green <andy.green@linaro.org>
-rw-r--r-- | drivers/usb/musb/musb_core.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c index 20a28731c33..2d3f1edf37d 100644 --- a/drivers/usb/musb/musb_core.c +++ b/drivers/usb/musb/musb_core.c @@ -2290,6 +2290,8 @@ static int musb_suspend(struct device *dev) struct musb *musb = dev_to_musb(dev); unsigned long flags; + pm_runtime_get_sync(musb->controller); + spin_lock_irqsave(&musb->lock, flags); if (is_peripheral_active(musb)) { @@ -2305,6 +2307,8 @@ static int musb_suspend(struct device *dev) musb_save_context(musb); spin_unlock_irqrestore(&musb->lock, flags); + pm_runtime_put(musb->controller); + return 0; } @@ -2312,12 +2316,17 @@ static int musb_resume_noirq(struct device *dev) { struct musb *musb = dev_to_musb(dev); + pm_runtime_get_sync(musb->controller); + musb_restore_context(musb); /* for static cmos like DaVinci, register values were preserved * unless for some reason the whole soc powered down or the USB * module got reset through the PSC (vs just being disabled). */ + + pm_runtime_put(musb->controller); + return 0; } |