diff options
author | Tian Tao <tiantao6@hisilicon.com> | 2021-05-21 03:59:35 +0300 |
---|---|---|
committer | Ulf Hansson <ulf.hansson@linaro.org> | 2021-06-14 14:57:41 +0300 |
commit | 07e70346e21eb8f018c8478cc4881ad9026bb12e (patch) | |
tree | 46823d47381b0d9e64fb6f9816d133ea23fd6f91 /drivers/mmc | |
parent | 05335af1e82a3ce2a7d410c7b1695a3c4ec37ea9 (diff) | |
download | linux-07e70346e21eb8f018c8478cc4881ad9026bb12e.tar.xz |
mmc: sdhci_am654: 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/1621558775-31185-1-git-send-email-tiantao6@hisilicon.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc')
-rw-r--r-- | drivers/mmc/host/sdhci_am654.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/mmc/host/sdhci_am654.c b/drivers/mmc/host/sdhci_am654.c index 1fad6e442688..f654afbe8e83 100644 --- a/drivers/mmc/host/sdhci_am654.c +++ b/drivers/mmc/host/sdhci_am654.c @@ -809,11 +809,9 @@ static int sdhci_am654_probe(struct platform_device *pdev) /* Clocks are enabled using pm_runtime */ pm_runtime_enable(dev); - ret = pm_runtime_get_sync(dev); - if (ret < 0) { - pm_runtime_put_noidle(dev); + ret = pm_runtime_resume_and_get(dev); + if (ret) goto pm_runtime_disable; - } base = devm_platform_ioremap_resource(pdev, 1); if (IS_ERR(base)) { |