aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/hw_random/timeriomem-rng.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char/hw_random/timeriomem-rng.c')
-rw-r--r--drivers/char/hw_random/timeriomem-rng.c2
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 03ff5483d865..1aa7e0b0ae0f 100644
--- a/drivers/char/hw_random/timeriomem-rng.c
+++ b/drivers/char/hw_random/timeriomem-rng.c
@@ -79,7 +79,7 @@ static int timeriomem_rng_read(struct hwrng *hwrng, void *data,
*/
if (retval > 0)
usleep_range(period_us,
- period_us + min(1, period_us / 100));
+ period_us + max(1, period_us / 100));
*(u32 *)data = readl(priv->io_base);
retval += sizeof(u32);