summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKrzysztof Kozlowski <k.kozlowski@samsung.com>2016-03-14 01:07:12 +0100
committerHerbert Xu <herbert@gondor.apana.org.au>2016-04-05 14:35:42 +0200
commitf0d947ac01632fa6c75cb07262922a93736385c1 (patch)
tree1a9416c44fb8905ea243dc123212f0ce7e7fdfb0
parentcrypto: omap-des - Improve wording for CRYPTO_DEV_OMAP_DES in Kconfig (diff)
downloadlinux-f0d947ac01632fa6c75cb07262922a93736385c1.tar.xz
linux-f0d947ac01632fa6c75cb07262922a93736385c1.zip
hwrng: exynos - Runtime suspend device after init
The driver uses pm_runtime_put_noidle() after initialization so the device might remain in active state if the core does not read from it (the read callback contains regular runtime put). The put_noidle() was chosen probably to avoid unneeded suspend and resume cycle after the initialization. However for this purpose autosuspend is enabled so it is safe to runtime put just after the initialization. Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
-rw-r--r--drivers/char/hw_random/exynos-rng.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/char/hw_random/exynos-rng.c b/drivers/char/hw_random/exynos-rng.c
index ada081232528..d1fd21e99368 100644
--- a/drivers/char/hw_random/exynos-rng.c
+++ b/drivers/char/hw_random/exynos-rng.c
@@ -77,7 +77,8 @@ static int exynos_init(struct hwrng *rng)
pm_runtime_get_sync(exynos_rng->dev);
ret = exynos_rng_configure(exynos_rng);
- pm_runtime_put_noidle(exynos_rng->dev);
+ pm_runtime_mark_last_busy(exynos_rng->dev);
+ pm_runtime_put_autosuspend(exynos_rng->dev);
return ret;
}