mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 1/2] gnss: serial: Use pm_runtime_resume_and_get()
@ 2026-09-24  2:11 phucduc.bui
  2026-09-24  2:11 ` [PATCH 2/2] gnss: sirf: " phucduc.bui
  0 siblings, 1 reply; 2+ messages in thread
From: phucduc.bui @ 2026-09-24  2:11 UTC (permalink / raw)
  To: Johan Hovold; +Cc: linux-kernel, bui duc phuc

From: bui duc phuc <phucduc.bui@gmail.com>

Replace the open-coded pm_runtime_get_sync() + pm_runtime_put_noidle()
error handling pattern with pm_runtime_resume_and_get(), which already
does this internally.

No functional change.

Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
---
 drivers/gnss/serial.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/gnss/serial.c b/drivers/gnss/serial.c
index 0e43bf6294f8..ae26b3915621 100644
--- a/drivers/gnss/serial.c
+++ b/drivers/gnss/serial.c
@@ -32,11 +32,9 @@ static int gnss_serial_open(struct gnss_device *gdev)
 	serdev_device_set_baudrate(serdev, gserial->speed);
 	serdev_device_set_flow_control(serdev, false);
 
-	ret = pm_runtime_get_sync(&serdev->dev);
-	if (ret < 0) {
-		pm_runtime_put_noidle(&serdev->dev);
+	ret = pm_runtime_resume_and_get(&serdev->dev);
+	if (ret < 0)
 		goto err_close;
-	}
 
 	return 0;
 
-- 
2.43.0


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

* [PATCH 2/2] gnss: sirf: Use pm_runtime_resume_and_get()
  2026-09-24  2:11 [PATCH 1/2] gnss: serial: Use pm_runtime_resume_and_get() phucduc.bui
@ 2026-09-24  2:11 ` phucduc.bui
  0 siblings, 0 replies; 2+ messages in thread
From: phucduc.bui @ 2026-09-24  2:11 UTC (permalink / raw)
  To: Johan Hovold; +Cc: linux-kernel, bui duc phuc

From: bui duc phuc <phucduc.bui@gmail.com>

Replace the open-coded pm_runtime_get_sync() + pm_runtime_put_noidle()
error handling pattern with pm_runtime_resume_and_get(), which already
does this internally.

No functional change.

Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
---
 drivers/gnss/sirf.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/gnss/sirf.c b/drivers/gnss/sirf.c
index 79375d14bbb6..4a68055a237f 100644
--- a/drivers/gnss/sirf.c
+++ b/drivers/gnss/sirf.c
@@ -103,10 +103,9 @@ static int sirf_open(struct gnss_device *gdev)
 		return ret;
 	}
 
-	ret = pm_runtime_get_sync(&serdev->dev);
+	ret = pm_runtime_resume_and_get(&serdev->dev);
 	if (ret < 0) {
 		dev_err(&gdev->dev, "failed to runtime resume: %d\n", ret);
-		pm_runtime_put_noidle(&serdev->dev);
 		goto err_close;
 	}
 
-- 
2.43.0


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

end of thread, other threads:[~2026-09-24  2:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-24  2:11 [PATCH 1/2] gnss: serial: Use pm_runtime_resume_and_get() phucduc.bui
2026-09-24  2:11 ` [PATCH 2/2] gnss: sirf: " phucduc.bui

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®