iio: imu: inv_mpu6050: do not flush fifo when iio buffer is full
authorJean-Baptiste Maneyrol <jmaneyrol@invensense.com>
Fri, 13 Apr 2018 08:25:06 +0000 (10:25 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 15 Apr 2018 17:06:25 +0000 (18:06 +0100)
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>
drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c

index ff81c6a..27c663c 100644 (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;
        }