summaryrefslogtreecommitdiff
path: root/drivers/mmc/host/sdhci-omap.c
diff options
context:
space:
mode:
authorTian Tao <tiantao6@hisilicon.com>2021-05-21 04:02:45 +0300
committerUlf Hansson <ulf.hansson@linaro.org>2021-06-14 14:57:41 +0300
commit809ae4e1ca0a719db29ed747fc2febf099a77b9f (patch)
tree8b8113f8b79c0ebdba7d32274ebf7e480ab98357 /drivers/mmc/host/sdhci-omap.c
parent07e70346e21eb8f018c8478cc4881ad9026bb12e (diff)
downloadlinux-809ae4e1ca0a719db29ed747fc2febf099a77b9f.tar.xz
mmc: sdhci-omap: 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/1621558965-34077-1-git-send-email-tiantao6@hisilicon.com Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc/host/sdhci-omap.c')
-rw-r--r--drivers/mmc/host/sdhci-omap.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/mmc/host/sdhci-omap.c b/drivers/mmc/host/sdhci-omap.c
index 7893fd3599b6..8f4d1f003f65 100644
--- a/drivers/mmc/host/sdhci-omap.c
+++ b/drivers/mmc/host/sdhci-omap.c
@@ -1173,10 +1173,9 @@ static int sdhci_omap_probe(struct platform_device *pdev)
* as part of pm_runtime_get_sync.
*/
pm_runtime_enable(dev);
- ret = pm_runtime_get_sync(dev);
- if (ret < 0) {
+ ret = pm_runtime_resume_and_get(dev);
+ if (ret) {
dev_err(dev, "pm_runtime_get_sync failed\n");
- pm_runtime_put_noidle(dev);
goto err_rpm_disable;
}