From: Jean-Baptiste Maneyrol Date: Fri, 13 Apr 2018 08:25:06 +0000 (+0200) Subject: iio: imu: inv_mpu6050: do not flush fifo when iio buffer is full X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=4efa1a0050eba411cd0b5b6714d6b89cdcb128f7;p=openwrt%2Fstaging%2Fblogic.git 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 --- 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; }