]> git.baikalelectronics.ru Git - kernel.git/commit
hwrng: omap - Switch to non-obsolete read API implementation
authorRomain Perier <romain.perier@free-electrons.com>
Fri, 16 Sep 2016 10:08:51 +0000 (12:08 +0200)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 21 Oct 2016 02:26:21 +0000 (10:26 +0800)
commitcc0147619733734658b37b9ef4891c45c7b1ad48
treef7f686a3a292d1d43ab92421d98f31cd3f6961ed
parent9399d8e26055bd227d4e3ec88af5dc7cd77e8f7b
hwrng: omap - Switch to non-obsolete read API implementation

The ".data_present" and ".data_read" operations are marked as OBSOLETE
in the hwrng API. We have to use the ".read" operation instead. It makes
the driver simpler and moves the busy loop, that waits until enough data
is generated, to the read function. We simplify this step by only
checking the status of the engine, if there is data, we copy the data to
the output buffer and the amout of copied data is returned to the caller,
otherwise zero is returned. The hwrng core will re-call the read operation
as many times as required until enough data has been copied.

Signed-off-by: Romain Perier <romain.perier@free-electrons.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/char/hw_random/omap-rng.c