diff options
author | Jia Jie Ho <jiajie.ho@starfivetech.com> | 2023-12-12 06:25:27 +0300 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2023-12-22 07:30:19 +0300 |
commit | 9b2b61126a06bd272ce4783cf571b2e6a0474950 (patch) | |
tree | 0ecdd9960e3ca4d8827db9685199059424db3b88 | |
parent | f1b2fe908467f45ec465c7b912681c0ff019485e (diff) | |
download | linux-9b2b61126a06bd272ce4783cf571b2e6a0474950.tar.xz |
hwrng: starfive - Add runtime pm ops
Define SET_RUNTIME_PM_OPS for StarFive TRNG driver.
Signed-off-by: Jia Jie Ho <jiajie.ho@starfivetech.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
-rw-r--r-- | drivers/char/hw_random/jh7110-trng.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/char/hw_random/jh7110-trng.c b/drivers/char/hw_random/jh7110-trng.c index b1f94e3c0c6a..9776f4daa044 100644 --- a/drivers/char/hw_random/jh7110-trng.c +++ b/drivers/char/hw_random/jh7110-trng.c @@ -369,8 +369,12 @@ static int __maybe_unused starfive_trng_resume(struct device *dev) return 0; } -static DEFINE_SIMPLE_DEV_PM_OPS(starfive_trng_pm_ops, starfive_trng_suspend, - starfive_trng_resume); +static const struct dev_pm_ops starfive_trng_pm_ops = { + SET_SYSTEM_SLEEP_PM_OPS(starfive_trng_suspend, + starfive_trng_resume) + SET_RUNTIME_PM_OPS(starfive_trng_suspend, + starfive_trng_resume, NULL) +}; static const struct of_device_id trng_dt_ids[] __maybe_unused = { { .compatible = "starfive,jh7110-trng" }, |