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

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>

authored by

Tian Tao and committed by
Ulf Hansson
809ae4e1 07e70346

+2 -3
+2 -3
drivers/mmc/host/sdhci-omap.c
··· 1173 1173 * as part of pm_runtime_get_sync. 1174 1174 */ 1175 1175 pm_runtime_enable(dev); 1176 - ret = pm_runtime_get_sync(dev); 1177 - if (ret < 0) { 1176 + ret = pm_runtime_resume_and_get(dev); 1177 + if (ret) { 1178 1178 dev_err(dev, "pm_runtime_get_sync failed\n"); 1179 - pm_runtime_put_noidle(dev); 1180 1179 goto err_rpm_disable; 1181 1180 } 1182 1181