All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] hwrng: exynos: Use pm_runtime_resume_and_get() to replace open coding
@ 2021-05-24 11:53 ` Tian Tao
  0 siblings, 0 replies; 8+ messages in thread
From: Tian Tao @ 2021-05-24 11:53 UTC (permalink / raw)
  To: l.stelmach, krzysztof.kozlowski
  Cc: linux-samsung-soc, linux-crypto, linux-arm-kernel, Tian Tao

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


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

end of thread, other threads:[~2021-06-03 12:31 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-24 11:53 [PATCH v2] hwrng: exynos: Use pm_runtime_resume_and_get() to replace open coding Tian Tao
2021-05-24 11:53 ` Tian Tao
2021-05-25 11:23 ` Krzysztof Kozlowski
2021-05-25 11:23   ` Krzysztof Kozlowski
     [not found] ` <CGME20210525144338eucas1p1ffe21ffce47146203dd1f6211a0e5408@eucas1p1.samsung.com>
2021-05-25 14:43   ` Lukasz Stelmach
2021-05-25 14:43     ` Lukasz Stelmach
2021-06-03 12:29 ` Herbert Xu
2021-06-03 12:29   ` Herbert Xu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.