Commit 05335af1 authored by Tian Tao's avatar Tian Tao Committed by Ulf Hansson

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: default avatarTian Tao <tiantao6@hisilicon.com>
Link: https://lore.kernel.org/r/1621513304-27824-1-git-send-email-tiantao6@hisilicon.comSigned-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
parent 83c49302
...@@ -937,12 +937,10 @@ static void mmc_sdio_detect(struct mmc_host *host) ...@@ -937,12 +937,10 @@ static void mmc_sdio_detect(struct mmc_host *host)
/* Make sure card is powered before detecting it */ /* Make sure card is powered before detecting it */
if (host->caps & MMC_CAP_POWER_OFF_CARD) { if (host->caps & MMC_CAP_POWER_OFF_CARD) {
err = pm_runtime_get_sync(&host->card->dev); err = pm_runtime_resume_and_get(&host->card->dev);
if (err < 0) { if (err < 0)
pm_runtime_put_noidle(&host->card->dev);
goto out; goto out;
} }
}
mmc_claim_host(host); mmc_claim_host(host);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment