linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] wlcore: sysfs: use pm_runtime_resume_and_get() instead of pm_runtime_get_sync()
@ 2022-04-13  9:34 cgel.zte
  2022-04-23  7:11 ` Kalle Valo
  0 siblings, 1 reply; 2+ messages in thread
From: cgel.zte @ 2022-04-13  9:34 UTC (permalink / raw)
  To: kvalo
  Cc: davem, kuba, linux-wireless, netdev, linux-kernel, Minghao Chi,
	Zeal Robot

From: Minghao Chi <chi.minghao@zte.com.cn>

Using pm_runtime_resume_and_get is more appropriate
for simplifing code

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
---
 drivers/net/wireless/ti/wlcore/sysfs.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/net/wireless/ti/wlcore/sysfs.c b/drivers/net/wireless/ti/wlcore/sysfs.c
index 35b535c125b6..f0c7e09b314d 100644
--- a/drivers/net/wireless/ti/wlcore/sysfs.c
+++ b/drivers/net/wireless/ti/wlcore/sysfs.c
@@ -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);
-- 
2.25.1



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: wlcore: sysfs: use pm_runtime_resume_and_get() instead of pm_runtime_get_sync()
  2022-04-13  9:34 [PATCH] wlcore: sysfs: use pm_runtime_resume_and_get() instead of pm_runtime_get_sync() cgel.zte
@ 2022-04-23  7:11 ` Kalle Valo
  0 siblings, 0 replies; 2+ messages in thread
From: Kalle Valo @ 2022-04-23  7:11 UTC (permalink / raw)
  To: cgel.zte
  Cc: davem, kuba, linux-wireless, netdev, linux-kernel, Minghao Chi,
	Zeal Robot

cgel.zte@gmail.com wrote:

> From: Minghao Chi <chi.minghao@zte.com.cn>
> 
> Using pm_runtime_resume_and_get is more appropriate
> for simplifing code
> 
> Reported-by: Zeal Robot <zealci@zte.com.cn>
> Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>

Patch applied to wireless-next.git, thanks.

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

-- 
https://patchwork.kernel.org/project/linux-wireless/patch/20220413093431.2538254-1-chi.minghao@zte.com.cn/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-04-23  7:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-13  9:34 [PATCH] wlcore: sysfs: use pm_runtime_resume_and_get() instead of pm_runtime_get_sync() cgel.zte
2022-04-23  7:11 ` Kalle Valo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).