Commit da8e909c authored by Minghao Chi's avatar Minghao Chi Committed by Kalle Valo

wlcore: sysfs: use pm_runtime_resume_and_get() instead of pm_runtime_get_sync()

Using pm_runtime_resume_and_get is more appropriate
for simplifing code
Reported-by: default avatarZeal Robot <zealci@zte.com.cn>
Signed-off-by: default avatarMinghao Chi <chi.minghao@zte.com.cn>
Signed-off-by: default avatarKalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20220413093431.2538254-1-chi.minghao@zte.com.cn
parent ab589ac2
......@@ -56,11 +56,9 @@ static ssize_t bt_coex_state_store(struct device *dev,
if (unlikely(wl->state != WLCORE_STATE_ON))
goto out;
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 out;
}
wl1271_acx_sg_enable(wl, wl->sg_enabled);
pm_runtime_mark_last_busy(wl->dev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment