mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 03:15:31 +09:00
usb: dwc3: gadget: Avoid get frame in runtime suspended state
If dwc gadget is already in runtime suspended state, it should not access the dwc3 register to get the frame number. Signed-off-by: William Wu <william.wu@rock-chips.com> Change-Id: I6107f8290eff68126198bcccc0561de7d480c221
This commit is contained in:
@@ -2446,6 +2446,9 @@ static int dwc3_gadget_get_frame(struct usb_gadget *g)
|
||||
{
|
||||
struct dwc3 *dwc = gadget_to_dwc(g);
|
||||
|
||||
if (pm_runtime_suspended(dwc->dev))
|
||||
return 0;
|
||||
|
||||
return __dwc3_gadget_get_frame(dwc);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user