• Romain Perier's avatar
    hwrng: omap - Switch to non-obsolete read API implementation · 69eb4d01
    Romain Perier authored
    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: default avatarRomain Perier <romain.perier@free-electrons.com>
    Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
    69eb4d01
omap-rng.c 11.3 KB