mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: phucduc.bui@gmail.com
To: Johan Hovold <johan@kernel.org>
Cc: linux-kernel@vger.kernel.org, bui duc phuc <phucduc.bui@gmail.com>
Subject: [PATCH 2/2] gnss: sirf: Use pm_runtime_resume_and_get()
Date: Thu, 24 Sep 2026 09:11:17 +0700	[thread overview]
Message-ID: <20260924021117.6534-2-phucduc.bui@gmail.com> (raw)
In-Reply-To: <20260924021117.6534-1-phucduc.bui@gmail.com>

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


      reply	other threads:[~2026-09-24  2:11 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-24  2:11 [PATCH 1/2] gnss: serial: " phucduc.bui
2026-09-24  2:11 ` phucduc.bui [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260924021117.6534-2-phucduc.bui@gmail.com \
    --to=phucduc.bui@gmail.com \
    --cc=johan@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®