summaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget/udc
diff options
context:
space:
mode:
authorKazuya Mizuguchi <kazuya.mizuguchi.ks@renesas.com>2017-09-29 20:44:59 +0900
committerFelipe Balbi <felipe.balbi@linux.intel.com>2017-10-19 10:38:07 +0300
commitcf06df3fae286b795c1abf59c4b493ebf30a7a9f (patch)
tree519e9a1cfdeda2d93f4dafec8e530cfdf6f67f73 /drivers/usb/gadget/udc
parent0f38672c629b79fa2b929d2c391bc063a08279eb (diff)
downloadlinux-cf06df3fae286b795c1abf59c4b493ebf30a7a9f.tar.bz2
usb: gadget: udc: renesas_usb3: move pm_runtime_{en,dis}able()
This patch moves pm_runtime_{en,dis}able() call timing to renesas_usb3_{probe,remove}() for supporting PM_SLEEP feature in the future. Signed-off-by: Kazuya Mizuguchi <kazuya.mizuguchi.ks@renesas.com> [shimoda: Revise the commit log] Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Diffstat (limited to 'drivers/usb/gadget/udc')
-rw-r--r--drivers/usb/gadget/udc/renesas_usb3.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/gadget/udc/renesas_usb3.c b/drivers/usb/gadget/udc/renesas_usb3.c
index 63a206122058..740497c43bd3 100644
--- a/drivers/usb/gadget/udc/renesas_usb3.c
+++ b/drivers/usb/gadget/udc/renesas_usb3.c
@@ -2239,7 +2239,6 @@ static int renesas_usb3_start(struct usb_gadget *gadget,
/* hook up the driver */
usb3->driver = driver;
- pm_runtime_enable(usb3_to_dev(usb3));
pm_runtime_get_sync(usb3_to_dev(usb3));
renesas_usb3_init_controller(usb3);
@@ -2257,7 +2256,6 @@ static int renesas_usb3_stop(struct usb_gadget *gadget)
renesas_usb3_stop_controller(usb3);
pm_runtime_put(usb3_to_dev(usb3));
- pm_runtime_disable(usb3_to_dev(usb3));
return 0;
}
@@ -2405,6 +2403,7 @@ static int renesas_usb3_remove(struct platform_device *pdev)
renesas_usb3_dma_free_prd(usb3, &pdev->dev);
__renesas_usb3_ep_free_request(usb3->ep0_req);
+ pm_runtime_disable(usb3_to_dev(usb3));
return 0;
}
@@ -2640,6 +2639,7 @@ static int renesas_usb3_probe(struct platform_device *pdev)
renesas_usb3_debugfs_init(usb3, &pdev->dev);
dev_info(&pdev->dev, "probed\n");
+ pm_runtime_enable(usb3_to_dev(usb3));
return 0;