diff options
author | Tian Tao <tiantao6@hisilicon.com> | 2021-05-24 14:53:38 +0300 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2021-06-03 15:24:04 +0300 |
commit | 5d0421d65be8c02bdde7a44f153babeaf004db7a (patch) | |
tree | d1b7044f8d87ea20cc9f8dd6b6ccc7a5eb722e4b /drivers/char/hw_random/exynos-trng.c | |
parent | e7662cb9e99ef0fd15b8a0dcb3e5d7b32f9812d4 (diff) | |
download | linux-5d0421d65be8c02bdde7a44f153babeaf004db7a.tar.xz |
hwrng: exynos - Use pm_runtime_resume_and_get() to replace open coding
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>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Acked-by: Ćukasz Stelmach <l.stelmach@samsung.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/char/hw_random/exynos-trng.c')
-rw-r--r-- | drivers/char/hw_random/exynos-trng.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/char/hw_random/exynos-trng.c b/drivers/char/hw_random/exynos-trng.c index c8db62bc5ff7..9cc3d542dd0f 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; } |