mmc: sdhci-omap: Fix a lockdep warning for PM runtime init
authorTony Lindgren <tony@atomide.com>
Wed, 22 Jun 2022 05:12:15 +0000 (08:12 +0300)
committerUlf Hansson <ulf.hansson@linaro.org>
Wed, 13 Jul 2022 10:29:17 +0000 (12:29 +0200)
commit51189eb9ddc88851edc42f539a0f9862fd0630c2
tree5793468dd46ae36ad551aacd14f74c565234639f
parent32346491ddf24599decca06190ebca03ff9de7f8
mmc: sdhci-omap: Fix a lockdep warning for PM runtime init

We need runtime PM enabled early in probe before sdhci_setup_host() for
sdhci_omap_set_capabilities(). But on the first runtime resume we must
not call sdhci_runtime_resume_host() as sdhci_setup_host() has not been
called yet. Let's check for an initialized controller like we already do
for context restore to fix a lockdep warning.

Fixes: f433e8aac6b9 ("mmc: sdhci-omap: Implement PM runtime functions")
Reported-by: Yegor Yefremov <yegorslists@googlemail.com>
Suggested-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20220622051215.34063-1-tony@atomide.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/sdhci-omap.c