From 98827e305e4c13add79acbfc58f15bd96c09cc92 Mon Sep 17 00:00:00 2001 From: Zorro Liu Date: Fri, 17 Jun 2016 11:43:19 +0800 Subject: [PATCH] driver, iio, mpuxxx: do nothing when fifo count is zero if fifo count is zero, just wait for data ready, there is no need to reset HW and SW fifo, or things may worse Change-Id: Ie65cdfde9c4939be772861f5c0842fb66c384827 Signed-off-by: Zorro Liu --- drivers/staging/iio/imu/inv_mpu/inv_mpu_ring.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/staging/iio/imu/inv_mpu/inv_mpu_ring.c b/drivers/staging/iio/imu/inv_mpu/inv_mpu_ring.c index d8558d75c70d..b4f15531da52 100644 --- a/drivers/staging/iio/imu/inv_mpu/inv_mpu_ring.c +++ b/drivers/staging/iio/imu/inv_mpu/inv_mpu_ring.c @@ -1002,8 +1002,10 @@ irqreturn_t inv_read_fifo(int irq, void *dev_id) if (result) goto end_session; fifo_count = be16_to_cpup((__be16 *)(&data[0])); + /* if (fifo_count == 0) goto flush_fifo; + */ if (fifo_count < bytes_per_datum) goto end_session; /* fifo count can't be odd number */ -- 2.34.1