From: Tian Tao <tiantao6@hisilicon.com>
To: <l.stelmach@samsung.com>, <krzysztof.kozlowski@canonical.com>
Cc: <linux-samsung-soc@vger.kernel.org>,
<linux-crypto@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>,
Tian Tao <tiantao6@hisilicon.com>
Subject: [PATCH v2] hwrng: exynos: Use pm_runtime_resume_and_get() to replace open coding
Date: Mon, 24 May 2021 19:53:38 +0800 [thread overview]
Message-ID: <1621857218-28590-1-git-send-email-tiantao6@hisilicon.com> (raw)
use 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.
Signed-off-by: Tian Tao <tiantao6@hisilicon.com>
---
v2: drop unnecessary change about if condition.
---
drivers/char/hw_random/exynos-trng.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/char/hw_random/exynos-trng.c b/drivers/char/hw_random/exynos-trng.c
index c8db62b..9cc3d54 100644
--- a/drivers/char/hw_random/exynos-trng.c
+++ b/drivers/char/hw_random/exynos-trng.c
@@ -196,10 +196,9 @@ static int __maybe_unused exynos_trng_resume(struct device *dev)
{
int ret;
- ret = pm_runtime_get_sync(dev);
+ ret = pm_runtime_resume_and_get(dev);
if (ret < 0) {
dev_err(dev, "Could not get runtime PM.\n");
- pm_runtime_put_noidle(dev);
return ret;
}
--
2.7.4
next reply other threads:[~2021-05-24 11:54 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-24 11:53 Tian Tao [this message]
2021-05-25 11:23 ` [PATCH v2] hwrng: exynos: Use pm_runtime_resume_and_get() to replace open coding Krzysztof Kozlowski
[not found] ` <CGME20210525144338eucas1p1ffe21ffce47146203dd1f6211a0e5408@eucas1p1.samsung.com>
2021-05-25 14:43 ` Lukasz Stelmach
2021-06-03 12:29 ` Herbert Xu
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=1621857218-28590-1-git-send-email-tiantao6@hisilicon.com \
--to=tiantao6@hisilicon.com \
--cc=krzysztof.kozlowski@canonical.com \
--cc=l.stelmach@samsung.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-samsung-soc@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;
as well as URLs for NNTP newsgroup(s).