Re: [PATCH] iio: imu: inv_mpu6050: do not flush fifo when iio buffer is full

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, 14 Apr 2018 11:00:07 -0700
Martin Kelly <martin@xxxxxxxxxxxxxxxx> wrote:

> On 04/13/2018 01:25 AM, Jean-Baptiste Maneyrol wrote:
> > There is no need to flush fifo and loose all data when the iio
> > buffer is full. Just drop the data by ignoring the error as
> > commonly done in other drivers.
> > 
> > Signed-off-by: Jean-Baptiste Maneyrol <jmaneyrol@xxxxxxxxxxxxxx>
> > ---
> >   drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c | 6 ++----
> >   1 file changed, 2 insertions(+), 4 deletions(-)
> > 
> > diff --git a/drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c b/drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c
> > index ff81c6a..27c663c 100644
> > --- a/drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c
> > +++ b/drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c
> > @@ -170,10 +170,8 @@ irqreturn_t inv_mpu6050_read_fifo(int irq, void *p)
> >   		if (result == 0)
> >   			timestamp = 0;
> >   
> > -		result = iio_push_to_buffers_with_timestamp(indio_dev, data,
> > -							    timestamp);
> > -		if (result)
> > -			goto flush_fifo;
> > +		iio_push_to_buffers_with_timestamp(indio_dev, data, timestamp);
> > +
> >   		fifo_count -= bytes_per_datum;
> >   	}
> >   
> >   
> 
> Reviewed-by: Martin Kelly <martin@xxxxxxxxxxxxxxxx>
> 
> I wondered the same thing as I was reading this code :).

Applied to the togreg branch of iio.git and pushed out as testing
for the autobuilders to play with it.

Thanks,

Jonathan

> --
> To unsubscribe from this list: send the line "unsubscribe linux-iio" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux