Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7afb83d9 authored by Rohith Kollalsi's avatar Rohith Kollalsi Committed by Pratham Pratap
Browse files

usb: dwc3: gadget: Replace dev with its parent sysdev in ep_disable



Currently when device enters lpm, runtime resume is called on dev
instead of its parent sys dev in ep_disable. Since dev is in
suspended state during ep_disable it is leading to a warning
from runtime.c when trying to perform a runtime resume. Also it
is not correct to resume dev in ep_disable as sys dev which is
associated with dwc3_msm is responsible to bring the clocks into
active state and perform a runtime resume. Hence replace dev here
with sys dev.

Change-Id: If9515e73129f4607adb8fa7d41ce7165efca3782
Signed-off-by: default avatarRohith Kollalsi <rkollals@codeaurora.org>
parent fc068f0a
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -1046,13 +1046,13 @@ static int dwc3_gadget_ep_disable(struct usb_ep *ep)
					dep->name))
		return 0;

	pm_runtime_get_sync(dwc->dev);
	pm_runtime_get_sync(dwc->sysdev);
	spin_lock_irqsave(&dwc->lock, flags);
	ret = __dwc3_gadget_ep_disable(dep);
	dbg_event(dep->number, "DISABLE", ret);
	spin_unlock_irqrestore(&dwc->lock, flags);
	pm_runtime_mark_last_busy(dwc->dev);
	pm_runtime_put_sync_autosuspend(dwc->dev);
	pm_runtime_mark_last_busy(dwc->sysdev);
	pm_runtime_put_sync_autosuspend(dwc->sysdev);

	return ret;
}