Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Tian Tao and committed by
Ulf Hansson
07e70346 05335af1

+2 -4
+2 -4
drivers/mmc/host/sdhci_am654.c
··· 809 809 810 810 /* Clocks are enabled using pm_runtime */ 811 811 pm_runtime_enable(dev); 812 - ret = pm_runtime_get_sync(dev); 813 - if (ret < 0) { 814 - pm_runtime_put_noidle(dev); 812 + ret = pm_runtime_resume_and_get(dev); 813 + if (ret) 815 814 goto pm_runtime_disable; 816 - } 817 815 818 816 base = devm_platform_ioremap_resource(pdev, 1); 819 817 if (IS_ERR(base)) {