Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Xichao Zhao and committed by
Herbert Xu
817fcdbd efaa2d81

+1 -1
+1 -1
drivers/char/hw_random/timeriomem-rng.c
··· 150 150 priv->rng_ops.quality = pdata->quality; 151 151 } 152 152 153 - priv->period = ns_to_ktime(period * NSEC_PER_USEC); 153 + priv->period = us_to_ktime(period); 154 154 init_completion(&priv->completion); 155 155 hrtimer_setup(&priv->timer, timeriomem_rng_trigger, CLOCK_MONOTONIC, HRTIMER_MODE_ABS); 156 156