summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Baptiste Maneyrol <jmaneyrol@invensense.com>2018-04-13 10:25:06 +0200
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2018-04-15 18:06:25 +0100
commit4efa1a0050eba411cd0b5b6714d6b89cdcb128f7 (patch)
tree08162b38d6f060ffd2ab5ed04e8b3d1408d80185
parentafcd0b22e35e0b3375e524c220ec52e549e9b9cb (diff)
downloadlinux-4efa1a0050eba411cd0b5b6714d6b89cdcb128f7.tar.bz2
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>
-rw-r--r--drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c6
1 files 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;
}