提交 f02b7d0c 编写于 作者: D Daniel Thompson 提交者: Herbert Xu

hwrng: exynos - Fix unbalanced PM runtime get/puts

Currently this driver calls pm_runtime_get_sync() rampantly
but never puts anything back. This makes it impossible for the
device to autosuspend properly; it will remain fully active
after the first use.

Fix in the obvious way.
Signed-off-by: NDaniel Thompson <daniel.thompson@linaro.org>
Cc: Kukjin Kim <kgene@kernel.org>
Cc: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Tested-by: NKrzysztof Kozlowski <k.kozlowski@samsung.com>
Reviewed-by: NKrzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
上级 839a42af
...@@ -95,7 +95,7 @@ static int exynos_read(struct hwrng *rng, void *buf, ...@@ -95,7 +95,7 @@ static int exynos_read(struct hwrng *rng, void *buf,
*data = exynos_rng_readl(exynos_rng, EXYNOS_PRNG_OUT1_OFFSET); *data = exynos_rng_readl(exynos_rng, EXYNOS_PRNG_OUT1_OFFSET);
pm_runtime_mark_last_busy(exynos_rng->dev); pm_runtime_mark_last_busy(exynos_rng->dev);
pm_runtime_autosuspend(exynos_rng->dev); pm_runtime_put_sync_autosuspend(exynos_rng->dev);
return 4; return 4;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册