diff options
author | Li Jun <jun.li@nxp.com> | 2020-02-19 19:20:04 +0300 |
---|---|---|
committer | Felipe Balbi <balbi@kernel.org> | 2020-03-15 12:31:36 +0300 |
commit | 0227cc84c44417a29c8102e41db8ec2c11ebc6b2 (patch) | |
tree | 5ea5b97eb5f1890236ad91becdb82cfa2b5f68f6 /drivers/usb/dwc3/core.c | |
parent | 4a1d042af4209544dba2196c2e92803907c3db88 (diff) | |
download | linux-0227cc84c44417a29c8102e41db8ec2c11ebc6b2.tar.xz |
usb: dwc3: core: don't do suspend for device mode if already suspended
If dwc->dev in device mode already runtime suspended, don't do it again
for system suspend.
Signed-off-by: Li Jun <jun.li@nxp.com>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
Diffstat (limited to 'drivers/usb/dwc3/core.c')
-rw-r--r-- | drivers/usb/dwc3/core.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c index e6879a38b5a8..edc17155cb2b 100644 --- a/drivers/usb/dwc3/core.c +++ b/drivers/usb/dwc3/core.c @@ -1632,6 +1632,8 @@ static int dwc3_suspend_common(struct dwc3 *dwc, pm_message_t msg) switch (dwc->current_dr_role) { case DWC3_GCTL_PRTCAP_DEVICE: + if (pm_runtime_suspended(dwc->dev)) + break; spin_lock_irqsave(&dwc->lock, flags); dwc3_gadget_suspend(dwc); spin_unlock_irqrestore(&dwc->lock, flags); |