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

Commit 54e691ed authored by Ajay Agarwal's avatar Ajay Agarwal
Browse files

usb: dwc3-msm: Remove redundant dwc3_msm_suspend call



dwc3_msm_pm_suspend bails out if DWC is not runtime suspended.
And if it is, it again calls dwc3_msm_suspend which is an
unnecessary call as it also returns if DWC is in LPM.
Remove this unnecssary dwc3_msm_suspend call.

Change-Id: I27a3f430e8c5ebec8eaccf05fe3cd3e3b5f06bce
Signed-off-by: default avatarAjay Agarwal <ajaya@codeaurora.org>
parent 4719c01d
Loading
Loading
Loading
Loading
+2 −5
Original line number Original line Diff line number Diff line
@@ -4393,7 +4393,6 @@ static void dwc3_otg_sm_work(struct work_struct *w)
#ifdef CONFIG_PM_SLEEP
#ifdef CONFIG_PM_SLEEP
static int dwc3_msm_pm_suspend(struct device *dev)
static int dwc3_msm_pm_suspend(struct device *dev)
{
{
	int ret = 0;
	struct dwc3_msm *mdwc = dev_get_drvdata(dev);
	struct dwc3_msm *mdwc = dev_get_drvdata(dev);
	struct dwc3 *dwc = platform_get_drvdata(mdwc->dwc3);
	struct dwc3 *dwc = platform_get_drvdata(mdwc->dwc3);


@@ -4406,11 +4405,9 @@ static int dwc3_msm_pm_suspend(struct device *dev)
		return -EBUSY;
		return -EBUSY;
	}
	}


	ret = dwc3_msm_suspend(mdwc);
	if (!ret)
	atomic_set(&mdwc->pm_suspended, 1);
	atomic_set(&mdwc->pm_suspended, 1);


	return ret;
	return 0;
}
}


static int dwc3_msm_pm_resume(struct device *dev)
static int dwc3_msm_pm_resume(struct device *dev)