iio: imu: st_lsm6dsx: flip irq return logic
authorSean Nyekjaer <sean@geanix.com>
Mon, 15 Jul 2019 07:07:15 +0000 (09:07 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sat, 27 Jul 2019 21:55:27 +0000 (22:55 +0100)
No need for using reverse logic in the irq return,
fix this by flip things around.

Signed-off-by: Sean Nyekjaer <sean@geanix.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_buffer.c

index 38194f4..1be1cec 100644 (file)
@@ -670,7 +670,7 @@ static irqreturn_t st_lsm6dsx_handler_thread(int irq, void *private)
        count = hw->settings->fifo_ops.read_fifo(hw);
        mutex_unlock(&hw->fifo_lock);
 
-       return !count ? IRQ_NONE : IRQ_HANDLED;
+       return count ? IRQ_HANDLED : IRQ_NONE;
 }
 
 static int st_lsm6dsx_buffer_preenable(struct iio_dev *iio_dev)