Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

iio: adc: ad4062: Replace IRQF_ONESHOT with IRQF_NO_THREAD

In ad4062_request_irq(), when request irq for "gp1", the code uses
IRQF_ONESHOT flag, which is not appropriate for a primary handler
that does not have a secondary threaded handler.

And since commit aef30c8d569c ("genirq: Warn about using IRQF_ONESHOT
without a threaded handler"), the IRQ core checks IRQF_ONESHOT flag
in IRQ request and gives a warning if there is no threaded handler.

Since there is no threaded handler, replace devm_request_threaded_irq
with devm_request_irq, and replace IRQF_ONESHOT with IRQF_NO_THREAD.

Also remove an extraneous semicolon at the end of
ad4062_write_raw_dispatch().

Found by code review, compile pass.

Fixes: d5284402d28f ("iio: adc: Add support for ad4062")
Signed-off-by: Felix Gu <ustc.gu@gmail.com>
Reviewed-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

authored by

Felix Gu and committed by
Jonathan Cameron
20c2a46d d14116f6

+3 -5
+3 -5
drivers/iio/adc/ad4062.c
··· 719 719 } 720 720 st->gpo_irq[1] = true; 721 721 722 - return devm_request_threaded_irq(dev, ret, 723 - ad4062_irq_handler_drdy, 724 - NULL, IRQF_ONESHOT, indio_dev->name, 725 - indio_dev); 722 + return devm_request_irq(dev, ret, ad4062_irq_handler_drdy, 723 + IRQF_NO_THREAD, indio_dev->name, indio_dev); 726 724 } 727 725 728 726 static const struct iio_trigger_ops ad4062_trigger_ops = { ··· 953 955 default: 954 956 return -EINVAL; 955 957 } 956 - }; 958 + } 957 959 958 960 static int ad4062_write_raw(struct iio_dev *indio_dev, 959 961 struct iio_chan_spec const *chan, int val,