Skip to contentSkip to conversation

iio: accel: fxls8962af: return IRQ_HANDLED when fifo is flushed

PATCH Applied Sean Nyekjaer 2 participants 2 messages Aug 17, 2021 – Aug 29, 2021 IIO

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 iio: accel: fxls8962af: return IRQ_HANDLED when fifo is flushed

fxls8962af_fifo_flush() will return the samples flushed. So return IRQ_NONE only if an error is returned.

Fixes 79e3a5bdd9ef ("iio: accel: fxls8962af: add hw buffered sampling")
---
 drivers/iio/accel/fxls8962af-core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/accel/fxls8962af-core.c +1 -1
index 078d87865fde..6b36eb362d07 100644
@@ -738,7 +738,7 @@ static irqreturn_t fxls8962af_interrupt(int irq, void *p)
 
 	if (reg & FXLS8962AF_INT_STATUS_SRC_BUF) {
 		ret = fxls8962af_fifo_flush(indio_dev);
-		if (ret)
+		if (ret < 0)
 			return IRQ_NONE;
 
 		return IRQ_HANDLED;
Signature · 1 line
2.32.0
maintainer Applied
#1 lore raw
Quoted 5 lines · On Tue, 17 Aug 2021 14:43:36 +0200 Sean Nyekjaer <[email protected]> wrote:

fxls8962af_fifo_flush() will return the samples flushed. So return IRQ_NONE only if an error is returned.

Fixes 79e3a5bdd9ef ("iio: accel: fxls8962af: add hw buffered sampling")

Applied to the fixes-togreg branch of iio.git and marked for stable.

Thanks,

Jonathan

Quoted 17 lines
---
 drivers/iio/accel/fxls8962af-core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/accel/fxls8962af-core.c +1 -1
index 078d87865fde..6b36eb362d07 100644
@@ -738,7 +738,7 @@ static irqreturn_t fxls8962af_interrupt(int irq, void *p)
 
 	if (reg & FXLS8962AF_INT_STATUS_SRC_BUF) {
 		ret = fxls8962af_fifo_flush(indio_dev);
-		if (ret)
+		if (ret < 0)
 			return IRQ_NONE;
 
 		return IRQ_HANDLED;