diff options
| author | Xichao Zhao <zhao.xichao@vivo.com> | 2025-07-31 20:17:27 +0800 |
|---|---|---|
| committer | Herbert Xu <herbert@gondor.apana.org.au> | 2025-08-16 17:24:31 +0800 |
| commit | 817fcdbd4ca29834014a5dadbe8e11efeb12800c (patch) | |
| tree | ebd64e18056fe259549df905a48ca0c1ca32175e /drivers/char | |
| parent | efaa2d815a0e4d1c06750e587100f6f7f4ee5497 (diff) | |
hwrng: timeriomem - Use us_to_ktime() where appropriate
It is better to replace ns_to_ktime() with us_to_ktime(),
which can make the code clearer.
Signed-off-by: Xichao Zhao <zhao.xichao@vivo.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/char')
| -rw-r--r-- | drivers/char/hw_random/timeriomem-rng.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/char/hw_random/timeriomem-rng.c b/drivers/char/hw_random/timeriomem-rng.c index b95f6d0f17ed..e61f06393209 100644 --- a/drivers/char/hw_random/timeriomem-rng.c +++ b/drivers/char/hw_random/timeriomem-rng.c @@ -150,7 +150,7 @@ static int timeriomem_rng_probe(struct platform_device *pdev) priv->rng_ops.quality = pdata->quality; } - priv->period = ns_to_ktime(period * NSEC_PER_USEC); + priv->period = us_to_ktime(period); init_completion(&priv->completion); hrtimer_setup(&priv->timer, timeriomem_rng_trigger, CLOCK_MONOTONIC, HRTIMER_MODE_ABS); |
