Skip to content

Commit a91aff1

Browse files
larsclausenjic23
authored andcommitted
staging:iio: Request threaded-only IRQs with IRQF_ONESHOT
Since commit 1c6c695 ("genirq: Reject bogus threaded irq requests") threaded IRQs without a primary handler need to be requested with IRQF_ONESHOT, otherwise the request will fail. This patch adds the IRQF_ONESHOT to IIO drivers where it is missing. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
1 parent e1dc7be commit a91aff1

5 files changed

Lines changed: 12 additions & 8 deletions

File tree

‎drivers/staging/iio/accel/sca3000_core.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1189,7 +1189,7 @@ static int __devinit sca3000_probe(struct spi_device *spi)
11891189
ret = request_threaded_irq(spi->irq,
11901190
NULL,
11911191
&sca3000_event_handler,
1192-
IRQF_TRIGGER_FALLING,
1192+
IRQF_TRIGGER_FALLING | IRQF_ONESHOT,
11931193
"sca3000",
11941194
indio_dev);
11951195
if (ret)

‎drivers/staging/iio/adc/ad7816.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ static int __devinit ad7816_probe(struct spi_device *spi_dev)
402402
ret = request_threaded_irq(spi_dev->irq,
403403
NULL,
404404
&ad7816_event_handler,
405-
IRQF_TRIGGER_LOW,
405+
IRQF_TRIGGER_LOW | IRQF_ONESHOT,
406406
indio_dev->name,
407407
indio_dev);
408408
if (ret)

‎drivers/staging/iio/adc/adt7310.c‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -778,7 +778,7 @@ static int __devinit adt7310_probe(struct spi_device *spi_dev)
778778
ret = request_threaded_irq(spi_dev->irq,
779779
NULL,
780780
&adt7310_event_handler,
781-
irq_flags,
781+
irq_flags | IRQF_ONESHOT,
782782
indio_dev->name,
783783
indio_dev);
784784
if (ret)
@@ -790,7 +790,8 @@ static int __devinit adt7310_probe(struct spi_device *spi_dev)
790790
ret = request_threaded_irq(adt7310_platform_data[0],
791791
NULL,
792792
&adt7310_event_handler,
793-
adt7310_platform_data[1],
793+
adt7310_platform_data[1] |
794+
IRQF_ONESHOT,
794795
indio_dev->name,
795796
indio_dev);
796797
if (ret)

‎drivers/staging/iio/adc/adt7410.c‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -742,7 +742,7 @@ static int __devinit adt7410_probe(struct i2c_client *client,
742742
ret = request_threaded_irq(client->irq,
743743
NULL,
744744
&adt7410_event_handler,
745-
IRQF_TRIGGER_LOW,
745+
IRQF_TRIGGER_LOW | IRQF_ONESHOT,
746746
id->name,
747747
indio_dev);
748748
if (ret)
@@ -754,7 +754,8 @@ static int __devinit adt7410_probe(struct i2c_client *client,
754754
ret = request_threaded_irq(adt7410_platform_data[0],
755755
NULL,
756756
&adt7410_event_handler,
757-
adt7410_platform_data[1],
757+
adt7410_platform_data[1] |
758+
IRQF_ONESHOT,
758759
id->name,
759760
indio_dev);
760761
if (ret)

‎drivers/staging/iio/cdc/ad7150.c‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -585,7 +585,8 @@ static int __devinit ad7150_probe(struct i2c_client *client,
585585
NULL,
586586
&ad7150_event_handler,
587587
IRQF_TRIGGER_RISING |
588-
IRQF_TRIGGER_FALLING,
588+
IRQF_TRIGGER_FALLING |
589+
IRQF_ONESHOT,
589590
"ad7150_irq1",
590591
indio_dev);
591592
if (ret)
@@ -598,7 +599,8 @@ static int __devinit ad7150_probe(struct i2c_client *client,
598599
NULL,
599600
&ad7150_event_handler,
600601
IRQF_TRIGGER_RISING |
601-
IRQF_TRIGGER_FALLING,
602+
IRQF_TRIGGER_FALLING |
603+
IRQF_ONESHOT,
602604
"ad7150_irq2",
603605
indio_dev);
604606
if (ret)

0 commit comments

Comments
 (0)