public inbox for linux-iio@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] iio: imu: inv_mpu6050: do not flush fifo when iio buffer is full
@ 2018-04-13  8:25 Jean-Baptiste Maneyrol
  2018-04-14 18:00 ` Martin Kelly
  0 siblings, 1 reply; 3+ messages in thread
From: Jean-Baptiste Maneyrol @ 2018-04-13  8:25 UTC (permalink / raw)
  To: linux-iio; +Cc: Jean-Baptiste Maneyrol

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>
---
 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 ff81c6a..27c663c 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.7.4


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-04-15 17:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-04-13  8:25 [PATCH] iio: imu: inv_mpu6050: do not flush fifo when iio buffer is full Jean-Baptiste Maneyrol
2018-04-14 18:00 ` Martin Kelly
2018-04-15 17:07   ` Jonathan Cameron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox