From: Minghao Chi Date: Wed, 20 Apr 2022 09:01:41 +0000 (+0000) Subject: wlcore: cmd: using pm_runtime_resume_and_get() instead of pm_runtime_get_sync() X-Git-Tag: howlett/maple/20220722_2~466^2~193^2~54 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=e05c7ddfeb23182421972b9074fb8f5aa356cfee;p=users%2Fjedix%2Flinux-maple.git wlcore: cmd: 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/20220420090141.2588553-1-chi.minghao@zte.com.cn --- diff --git a/drivers/net/wireless/ti/wlcore/cmd.c b/drivers/net/wireless/ti/wlcore/cmd.c index 09eb1116be0e..df6029ef6304 100644 --- a/drivers/net/wireless/ti/wlcore/cmd.c +++ b/drivers/net/wireless/ti/wlcore/cmd.c @@ -178,11 +178,9 @@ int wlcore_cmd_wait_for_event_or_timeout(struct wl1271 *wl, timeout_time = jiffies + msecs_to_jiffies(WL1271_EVENT_TIMEOUT); - ret = pm_runtime_get_sync(wl->dev); - if (ret < 0) { - pm_runtime_put_noidle(wl->dev); + ret = pm_runtime_resume_and_get(wl->dev); + if (ret < 0) goto free_vector; - } do { if (time_after(jiffies, timeout_time)) {