From c9e2e4429da39fe2d3e622fba51ebf68e00e3caa Mon Sep 17 00:00:00 2001 From: Vijay Viswanath Date: Thu, 20 Jul 2017 15:50:19 +0530 Subject: [PATCH] mmc: sdhci-msm: Put platform suspend in late suspend list Since there is no longer a parent child relation between the platform sdhc device and the sdhc card, there is a possibility that the mmc card suspend can be executed after sdhc platform suspend is done. This can happen if async suspend of mmc card is enabled. Suspending of mmc card requires platform device to be on and platform device suspend should occur after mmc card suspend. To ensure this ordering in system suspend case, let the card suspend in the regular suspend phase and make the platform device suspend in the late suspend phase of system suspend. Change-Id: I092056bf4099c09fcb4bd12695367f9d02ae9776 Signed-off-by: Vijay Viswanath --- drivers/mmc/host/sdhci-msm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mmc/host/sdhci-msm.c b/drivers/mmc/host/sdhci-msm.c index 907763ddf234..984dcf992169 100644 --- a/drivers/mmc/host/sdhci-msm.c +++ b/drivers/mmc/host/sdhci-msm.c @@ -5009,7 +5009,7 @@ static int sdhci_msm_suspend_noirq(struct device *dev) } static const struct dev_pm_ops sdhci_msm_pmops = { - SET_SYSTEM_SLEEP_PM_OPS(sdhci_msm_suspend, sdhci_msm_resume) + SET_LATE_SYSTEM_SLEEP_PM_OPS(sdhci_msm_suspend, sdhci_msm_resume) SET_RUNTIME_PM_OPS(sdhci_msm_runtime_suspend, sdhci_msm_runtime_resume, NULL) .suspend_noirq = sdhci_msm_suspend_noirq,