[PATCH] usb: musb: do not backup/restore registers in runtime PM callbacks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The MUSB controller does not lost power during runtime suspend/resume,
so unnecessary to backup/restore its registers.

Signed-off-by: Bin Liu <b-liu@xxxxxx>
---
 drivers/usb/musb/musb_core.c | 18 ------------------
 1 file changed, 18 deletions(-)

diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c
index bb2d38e..1167906 100644
--- a/drivers/usb/musb/musb_core.c
+++ b/drivers/usb/musb/musb_core.c
@@ -2476,30 +2476,12 @@ static int musb_resume(struct device *dev)
 
 static int musb_runtime_suspend(struct device *dev)
 {
-	struct musb	*musb = dev_to_musb(dev);
-
-	musb_save_context(musb);
-
 	return 0;
 }
 
 static int musb_runtime_resume(struct device *dev)
 {
 	struct musb	*musb = dev_to_musb(dev);
-	static int	first = 1;
-
-	/*
-	 * When pm_runtime_get_sync called for the first time in driver
-	 * init,  some of the structure is still not initialized which is
-	 * used in restore function. But clock needs to be
-	 * enabled before any register access, so
-	 * pm_runtime_get_sync has to be called.
-	 * Also context restore without save does not make
-	 * any sense
-	 */
-	if (!first)
-		musb_restore_context(musb);
-	first = 0;
 
 	if (musb->need_finish_resume) {
 		musb->need_finish_resume = 0;
-- 
1.8.4

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux