From: Lionel Debieve Date: Mon, 1 Apr 2019 10:30:46 +0000 (+0200) Subject: hwrng: stm32 - set default random quality X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=38a1965f42cc750652ed5ec70bb0cb3f7a4e20b9;p=openwrt%2Fstaging%2Fblogic.git hwrng: stm32 - set default random quality Add a default quality to hw_random device to be automatically set as new default entropy. Setting random quality will decrease the crng init time by switching to this hardware random source. Signed-off-by: Lionel Debieve Signed-off-by: Herbert Xu --- diff --git a/drivers/char/hw_random/stm32-rng.c b/drivers/char/hw_random/stm32-rng.c index 37b338a76ba4..0ef5b6a3f560 100644 --- a/drivers/char/hw_random/stm32-rng.c +++ b/drivers/char/hw_random/stm32-rng.c @@ -161,6 +161,7 @@ static int stm32_rng_probe(struct platform_device *ofdev) #endif priv->rng.read = stm32_rng_read, priv->rng.priv = (unsigned long) dev; + priv->rng.quality = 900; pm_runtime_set_autosuspend_delay(dev, 100); pm_runtime_use_autosuspend(dev);