hwrng: imx-rngc - simplify interrupt mask/unmask
authorMartin Kaiser <martin@kaiser.cx>
Thu, 5 Mar 2020 20:58:24 +0000 (21:58 +0100)
committerHerbert Xu <herbert@gondor.apana.org.au>
Thu, 12 Mar 2020 12:00:15 +0000 (23:00 +1100)
commitf086fd1e43443dd3c3fd26d3d1a59e52fc4bf29b
tree17e42bb608c289c7b61d5fb7f48b37da0f80264c
parentb9957fc944586da3d4a175c811afec563636c713
hwrng: imx-rngc - simplify interrupt mask/unmask

Use a simpler approach for masking / unmasking the rngc interrupt:
The interrupt is unmasked while self-test is running and when the rngc
driver is used by the hwrng core.

Mask the interrupt again when self test is finished, regardless of
self test success or failure.

Unmask the interrupt in the init function. Add a cleanup function where
the rngc interrupt is masked again.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/char/hw_random/imx-rngc.c