Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4efa1a00 authored by Jean-Baptiste Maneyrol's avatar Jean-Baptiste Maneyrol Committed by Jonathan Cameron
Browse files

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: default avatarJean-Baptiste Maneyrol <jmaneyrol@invensense.com>
Reviewed-by: default avatarMartin Kelly <martin@martingkelly.com>
Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent afcd0b22
Loading
Loading
Loading
Loading
+2 −4
Original line number Original line Diff line number Diff line
@@ -170,10 +170,8 @@ irqreturn_t inv_mpu6050_read_fifo(int irq, void *p)
		if (result == 0)
		if (result == 0)
			timestamp = 0;
			timestamp = 0;


		result = iio_push_to_buffers_with_timestamp(indio_dev, data,
		iio_push_to_buffers_with_timestamp(indio_dev, data, timestamp);
							    timestamp);

		if (result)
			goto flush_fifo;
		fifo_count -= bytes_per_datum;
		fifo_count -= bytes_per_datum;
	}
	}