]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
iio: imu: st_lsm6dsx: flip irq return logic
authorSean Nyekjaer <sean@geanix.com>
Mon, 15 Jul 2019 07:07:15 +0000 (09:07 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 17 Jan 2021 12:58:59 +0000 (13:58 +0100)
commit ec76d918f23034f9f662539ca9c64e2ae3ba9fba upstream

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>
Signed-off-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_buffer.c

index e2737dc71b677665a5a67b319d1a8c22a91b0efc..885c7e6dec77e1f9f6c05e34d151f05d026128b8 100644 (file)
@@ -401,7 +401,7 @@ static irqreturn_t st_lsm6dsx_handler_thread(int irq, void *private)
        count = st_lsm6dsx_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)