Message ID | 20190715070715.75976-1-sean@geanix.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | iio: imu: st_lsm6dsx: flip irq return logic | expand |
On Mon, 15 Jul 2019 09:07:15 +0200 Sean Nyekjaer <sean@geanix.com> wrote: > No need for using reverse logic in the irq return, > fix this by flip things around. > > Signed-off-by: Sean Nyekjaer <sean@geanix.com> 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 > --- > drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_buffer.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_buffer.c b/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_buffer.c > index 38194f4d2b7e..1be1cec2ab23 100644 > --- a/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_buffer.c > +++ b/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_buffer.c > @@ -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)
diff --git a/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_buffer.c b/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_buffer.c index 38194f4d2b7e..1be1cec2ab23 100644 --- a/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_buffer.c +++ b/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_buffer.c @@ -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)
No need for using reverse logic in the irq return, fix this by flip things around. Signed-off-by: Sean Nyekjaer <sean@geanix.com> --- drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_buffer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)