aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTian Tao <tiantao6@hisilicon.com>2021-05-20 20:21:44 +0800
committerUlf Hansson <ulf.hansson@linaro.org>2021-06-14 13:57:41 +0200
commit05335af1e82a3ce2a7d410c7b1695a3c4ec37ea9 (patch)
tree8781cdccebf88bb5f3666abc569e0dd92031eb0c
parentmmc: cqhci: introduce get_trans_desc_offset() (diff)
downloadlinux-dev-05335af1e82a3ce2a7d410c7b1695a3c4ec37ea9.tar.xz
linux-dev-05335af1e82a3ce2a7d410c7b1695a3c4ec37ea9.zip
mmc: core: Use pm_runtime_resume_and_get() to replace open coding
use pm_runtime_resume_and_get() to replace pm_runtime_get_sync and pm_runtime_put_noidle. this change is just to simplify the code, no actual functional changes Signed-off-by: Tian Tao <tiantao6@hisilicon.com> Link: https://lore.kernel.org/r/1621513304-27824-1-git-send-email-tiantao6@hisilicon.com Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-rw-r--r--drivers/mmc/core/sdio.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/mmc/core/sdio.c b/drivers/mmc/core/sdio.c
index 3eb94ac2712e..68edf7a615be 100644
--- a/drivers/mmc/core/sdio.c
+++ b/drivers/mmc/core/sdio.c
@@ -937,11 +937,9 @@ static void mmc_sdio_detect(struct mmc_host *host)
/* Make sure card is powered before detecting it */
if (host->caps & MMC_CAP_POWER_OFF_CARD) {
- err = pm_runtime_get_sync(&host->card->dev);
- if (err < 0) {
- pm_runtime_put_noidle(&host->card->dev);
+ err = pm_runtime_resume_and_get(&host->card->dev);
+ if (err < 0)
goto out;
- }
}
mmc_claim_host(host);