iio: imu: st_lsm6dsx: flip irq return logic
Subsystems (2)
PATCH 1/1 iio: imu: st_lsm6dsx: flip irq return logic
No need for using reverse logic in the irq return, fix this by flip things around.
Signed-off-by Sean Nyekjaer <[email protected]>
--- drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_buffer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_buffer.c +1 -1
@@ -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)
Signature · 1 line
2.22.0
Jonathan Cameron
maintainerQuoted 4 lines · On Mon, 15 Jul 2019 09:07:15 +0200 Sean Nyekjaer <[email protected]> wrote:
No need for using reverse logic in the irq return, fix this by flip things around.
Signed-off-by Sean Nyekjaer <[email protected]>
This is indeed rather strange! Code evolution I guess ;)
Applied to the togreg branch of iio.git and pushed out as testing for the autobuilders to play with it.
Thanks,
Jonathan
Quoted 17 lines
--- drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_buffer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_buffer.c +1
-1@@ -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)