[PATCH 3/3] hwrng: imx-rngc - setup default RNG quality

Christian Eggers
2020-07-27T11:03:07Z

When hw_random device's quality is non-zero, it will automatically fill
the kernel's entropy pool at boot. For this purpose, one conservative
quality value is being picked up as the default value.

Signed-off-by: Christian Eggers <ceggers@arri.de>
---
drivers/char/hw_random/imx-rngc.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/char/hw_random/imx-rngc.c b/drivers/char/hw_random/imx-rngc.c
index f9c5ddd0276b..a62ff78bd7ea 100644
--- a/drivers/char/hw_random/imx-rngc.c
+++ b/drivers/char/hw_random/imx-rngc.c
@@ -285,6 +285,7 @@ static int imx_rngc_probe(struct platform_device *pdev)
rngc->rng.init = imx_rngc_init;
rngc->rng.read = imx_rngc_read;
rngc->rng.cleanup = imx_rngc_cleanup;
+ rngc->rng.quality = 900;

rngc->dev = &pdev->dev;
platform_set_drvdata(pdev, rngc);