MLK-23342-1 usb: dwc3: core: don't do suspend for device if suspended
If dwc->dev is already suspended in device mode, don't do it again. Reviewed-by: Peter Chen <peter.chen@nxp.com> Signed-off-by: Li Jun <jun.li@nxp.com>5.4-rM2-2.2.x-imx-squashed
parent
5899aa781b
commit
fa7f754967
|
@ -1697,6 +1697,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);
|
||||
|
|
Loading…
Reference in New Issue