From: Minghao Chi Date: Tue, 19 Apr 2022 11:04:45 +0000 (+0000) Subject: wlcore: sdio: using pm_runtime_resume_and_get() instead of pm_runtime_get_sync() X-Git-Tag: v6.1-rc5~1274^2~193^2~55 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=00bfc8964f4349dacc6799fe712de186e9bd8bb8;p=platform%2Fkernel%2Flinux-starfive.git wlcore: sdio: using pm_runtime_resume_and_get() instead of pm_runtime_get_sync() Using 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. Reported-by: Zeal Robot Signed-off-by: Minghao Chi Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220419110445.2574424-1-chi.minghao@zte.com.cn --- diff --git a/drivers/net/wireless/ti/wlcore/sdio.c b/drivers/net/wireless/ti/wlcore/sdio.c index 72fc41a..7b4e8cc 100644 --- a/drivers/net/wireless/ti/wlcore/sdio.c +++ b/drivers/net/wireless/ti/wlcore/sdio.c @@ -132,9 +132,8 @@ static int wl12xx_sdio_power_on(struct wl12xx_sdio_glue *glue) struct sdio_func *func = dev_to_sdio_func(glue->dev); struct mmc_card *card = func->card; - ret = pm_runtime_get_sync(&card->dev); + ret = pm_runtime_resume_and_get(&card->dev); if (ret < 0) { - pm_runtime_put_noidle(&card->dev); dev_err(glue->dev, "%s: failed to get_sync(%d)\n", __func__, ret);