From 4efa1a0050eba411cd0b5b6714d6b89cdcb128f7 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Maneyrol Date: Fri, 13 Apr 2018 10:25:06 +0200 Subject: [PATCH] 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 Reviewed-by: Martin Kelly Signed-off-by: Jonathan Cameron --- 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 ff81c6aa009d..27c663ca1f44 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; } -- 2.30.2