Re: [PATCH v2 3/8] hwrng: omap - Switch to non-obsolete read API implementation

2016-09-16 Thread Romain Perier
Hi, Le 13/09/2016 11:48, Herbert Xu a écrit : On Wed, Sep 07, 2016 at 05:57:38PM +0200, Romain Perier wrote: + +static int omap_rng_do_read(struct hwrng *rng, void *data, size_t max, + bool wait) { struct omap_rng_dev *priv; - int data, i; priv

Re: [PATCH v2 3/8] hwrng: omap - Switch to non-obsolete read API implementation

2016-09-13 Thread Herbert Xu
On Wed, Sep 07, 2016 at 05:57:38PM +0200, Romain Perier wrote: > + > +static int omap_rng_do_read(struct hwrng *rng, void *data, size_t max, > + bool wait) > { > struct omap_rng_dev *priv; > - int data, i; > > priv = (struct omap_rng_dev *)rng->priv; > >

[PATCH v2 3/8] hwrng: omap - Switch to non-obsolete read API implementation

2016-09-07 Thread Romain Perier
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 removes the need to do a busy loop to wait until enough data is generated by the IP. We simplify this step by only checking the stat