hwrng: imx-rngc - fix the timeout for init and self check
authorMartin Kaiser <martin@kaiser.cx>
Thu, 15 Jun 2023 14:49:59 +0000 (15:49 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 23 Jul 2023 11:49:35 +0000 (13:49 +0200)
commitef709350ef0b42995f899c8ef7bf74690dca4d76
treed6283bd19fba86190b210edbc014dbf31d6d7c5c
parentc7feb54b113802d2aba98708769d3c33fb017254
hwrng: imx-rngc - fix the timeout for init and self check

commit d744ae7477190967a3ddc289e2cd4ae59e8b1237 upstream.

Fix the timeout that is used for the initialisation and for the self
test. wait_for_completion_timeout expects a timeout in jiffies, but
RNGC_TIMEOUT is in milliseconds. Call msecs_to_jiffies to do the
conversion.

Cc: stable@vger.kernel.org
Fixes: 1d5449445bd0 ("hwrng: mx-rngc - add a driver for Freescale RNGC")
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/char/hw_random/imx-rngc.c