aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/musb/musb_core.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/musb/musb_core.c')
-rw-r--r--drivers/usb/musb/musb_core.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c
index fd34867..9abb76d 100644
--- a/drivers/usb/musb/musb_core.c
+++ b/drivers/usb/musb/musb_core.c
@@ -2225,6 +2225,8 @@ static int musb_suspend(struct device *dev)
}
spin_unlock_irqrestore(&musb->lock, flags);
+ if (!pm_runtime_status_suspended(dev))
+ musb_save_context(musb);
return 0;
}
@@ -2234,6 +2236,10 @@ static int musb_resume_noirq(struct device *dev)
* unless for some reason the whole soc powered down or the USB
* module got reset through the PSC (vs just being disabled).
*/
+ struct musb *musb = dev_to_musb(dev);
+
+ if (!pm_runtime_status_suspended(dev))
+ musb_restore_context(musb);
return 0;
}