]> asedeno.scripts.mit.edu Git - linux.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)
commit69eb4d0190eab9e32fccbe1ec64dec1cfa7fb01a
treef7f686a3a292d1d43ab92421d98f31cd3f6961ed
parent52060836f79080849dd90e3ae1aeb288411f3def
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