summaryrefslogtreecommitdiff
path: root/drivers/char
diff options
context:
space:
mode:
authorTian Tao <tiantao6@hisilicon.com>2021-05-24 20:28:38 +0800
committerHerbert Xu <herbert@gondor.apana.org.au>2021-06-03 20:24:04 +0800
commite9009fb227fa66a66cef02a36fb51c288f411e0d (patch)
tree2b7ef2a485a0a38470057173a27e4ef3e10e41a9 /drivers/char
parentb21d14d9885ace8587a5b5b36cdcda9d8814f313 (diff)
hwrng: ks-sa - 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> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/char')
-rw-r--r--drivers/char/hw_random/ks-sa-rng.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/char/hw_random/ks-sa-rng.c b/drivers/char/hw_random/ks-sa-rng.c
index 8f1d47ff9799..2f2f21f1b659 100644
--- a/drivers/char/hw_random/ks-sa-rng.c
+++ b/drivers/char/hw_random/ks-sa-rng.c
@@ -241,10 +241,9 @@ static int ks_sa_rng_probe(struct platform_device *pdev)
}
pm_runtime_enable(dev);
- ret = pm_runtime_get_sync(dev);
+ ret = pm_runtime_resume_and_get(dev);
if (ret < 0) {
dev_err(dev, "Failed to enable SA power-domain\n");
- pm_runtime_put_noidle(dev);
pm_runtime_disable(dev);
return ret;
}