patch "iio: ad7768-1: Call iio_trigger_notify_done() on error" added to char-misc-linus
This is a note to let you know that I've just added the patch titled
iio: ad7768-1: Call iio_trigger_notify_done() on error
to my char-misc git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git
in the char-misc-linus branch.
The patch will show up in the next release of the linux-next tree (usually sometime within the next 24 hours during the week.)
The patch will hopefully also be merged in Linus's tree for the next -rc kernel release.
If you have any questions about this process, please let me know.
From 6661146427cbbce6d1fe3dbb11ff1c487f55799a Mon Sep 17 00:00:00 2001
From: Lars-Peter Clausen <[email protected]>
Date: Mon, 1 Nov 2021 15:40:55 +0100
Subject: iio: ad7768-1: Call iio_trigger_notify_done() on error
IIO trigger handlers must call iio_trigger_notify_done() when done. This must be done even when an error occurred. Otherwise the trigger will be seen as busy indefinitely and the trigger handler will never be called again.
The ad7768-1 driver neglects to call iio_trigger_notify_done() when there is an error reading the converter data. Fix this by making sure that iio_trigger_notify_done() is included in the error exit path.
--- drivers/iio/adc/ad7768-1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/adc/ad7768-1.c +1 -1
@@ -480,8 +480,8 @@ static irqreturn_t ad7768_trigger_handler(int irq, void *p)iio_push_to_buffers_with_timestamp (indio_dev, &st->data.scan,iio_get_time_ns (indio_dev)); -iio_trigger_notify_done (indio_dev->trig); err_unlock: +iio_trigger_notify_done (indio_dev->trig);mutex_unlock (&st->lock);return IRQ_HANDLED ;
Signature · 1 line
2.34.1