iio: imu: inv_mpu6050: do not flush fifo when iio buffer is full

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@invensense.com>
Reviewed-by: Martin Kelly <martin@martingkelly.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
This commit is contained in:
Jean-Baptiste Maneyrol 2018-04-13 10:25:06 +02:00 committed by Jonathan Cameron
parent afcd0b22e3
commit 4efa1a0050
1 changed files with 2 additions and 4 deletions

View File

@ -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;
}