Re: usb: dwc3: gadget: Change runtime pm function for DWC3 runtime suspend

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

 



Hello!

On 15.02.2021 5:38, Daehwan Jung wrote:

It seems pm_runtime_put calls runtime_idle callback not runtime_suspend callback.
It's better to use pm_runtime_put_sync_suspend to allow DWC3 runtime suspend.

Signed-off-by: Daehwan Jung <dh10.jung@xxxxxxxxxxx>
---
  drivers/usb/dwc3/gadget.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
index aebcf8e..4a4b93b 100644
--- a/drivers/usb/dwc3/gadget.c
+++ b/drivers/usb/dwc3/gadget.c
@@ -2229,7 +2229,7 @@ static int dwc3_gadget_pullup(struct usb_gadget *g, int is_on)
  	 */
  	ret = pm_runtime_get_sync(dwc->dev);
  	if (!ret || ret < 0) {

   BTW, this can be shortened to (ret <= 0)...

-		pm_runtime_put(dwc->dev);
+		pm_runtime_put_sync_suspend(dwc->dev);
  		return 0;
  	}

MBR, Sergei



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

  Powered by Linux