Thread (3 messages) 3 messages, 3 authors, 2021-06-03
STALE1822d

[PATCH v2] hwrng: exynos: Use pm_runtime_resume_and_get() to replace open coding

From: Tian Tao <tiantao6@hisilicon.com>
Date: 2021-05-24 11:54:02
Also in: linux-arm-kernel, linux-samsung-soc
Subsystem: hardware random number generator core, samsung exynos true random number generator (trng) driver, the rest · Maintainers: Olivia Mackall, Herbert Xu, Łukasz Stelmach, Linus Torvalds

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help