Skip to content

Commit

Permalink
staging:iio: Request threaded-only IRQs with IRQF_ONESHOT
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Lars-Peter Clausen authored and Jonathan Cameron committed Jul 8, 2012
1 parent e1dc7be commit a91aff1
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 8 deletions.
2 changes: 1 addition & 1 deletion drivers/staging/iio/accel/sca3000_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1189,7 +1189,7 @@ static int __devinit sca3000_probe(struct spi_device *spi)
ret = request_threaded_irq(spi->irq,
NULL,
&sca3000_event_handler,
IRQF_TRIGGER_FALLING,
IRQF_TRIGGER_FALLING | IRQF_ONESHOT,
"sca3000",
indio_dev);
if (ret)
Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/iio/adc/ad7816.c
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ static int __devinit ad7816_probe(struct spi_device *spi_dev)
ret = request_threaded_irq(spi_dev->irq,
NULL,
&ad7816_event_handler,
IRQF_TRIGGER_LOW,
IRQF_TRIGGER_LOW | IRQF_ONESHOT,
indio_dev->name,
indio_dev);
if (ret)
Expand Down
5 changes: 3 additions & 2 deletions drivers/staging/iio/adc/adt7310.c
Original file line number Diff line number Diff line change
Expand Up @@ -778,7 +778,7 @@ static int __devinit adt7310_probe(struct spi_device *spi_dev)
ret = request_threaded_irq(spi_dev->irq,
NULL,
&adt7310_event_handler,
irq_flags,
irq_flags | IRQF_ONESHOT,
indio_dev->name,
indio_dev);
if (ret)
Expand All @@ -790,7 +790,8 @@ static int __devinit adt7310_probe(struct spi_device *spi_dev)
ret = request_threaded_irq(adt7310_platform_data[0],
NULL,
&adt7310_event_handler,
adt7310_platform_data[1],
adt7310_platform_data[1] |
IRQF_ONESHOT,
indio_dev->name,
indio_dev);
if (ret)
Expand Down
5 changes: 3 additions & 2 deletions drivers/staging/iio/adc/adt7410.c
Original file line number Diff line number Diff line change
Expand Up @@ -742,7 +742,7 @@ static int __devinit adt7410_probe(struct i2c_client *client,
ret = request_threaded_irq(client->irq,
NULL,
&adt7410_event_handler,
IRQF_TRIGGER_LOW,
IRQF_TRIGGER_LOW | IRQF_ONESHOT,
id->name,
indio_dev);
if (ret)
Expand All @@ -754,7 +754,8 @@ static int __devinit adt7410_probe(struct i2c_client *client,
ret = request_threaded_irq(adt7410_platform_data[0],
NULL,
&adt7410_event_handler,
adt7410_platform_data[1],
adt7410_platform_data[1] |
IRQF_ONESHOT,
id->name,
indio_dev);
if (ret)
Expand Down
6 changes: 4 additions & 2 deletions drivers/staging/iio/cdc/ad7150.c
Original file line number Diff line number Diff line change
Expand Up @@ -585,7 +585,8 @@ static int __devinit ad7150_probe(struct i2c_client *client,
NULL,
&ad7150_event_handler,
IRQF_TRIGGER_RISING |
IRQF_TRIGGER_FALLING,
IRQF_TRIGGER_FALLING |
IRQF_ONESHOT,
"ad7150_irq1",
indio_dev);
if (ret)
Expand All @@ -598,7 +599,8 @@ static int __devinit ad7150_probe(struct i2c_client *client,
NULL,
&ad7150_event_handler,
IRQF_TRIGGER_RISING |
IRQF_TRIGGER_FALLING,
IRQF_TRIGGER_FALLING |
IRQF_ONESHOT,
"ad7150_irq2",
indio_dev);
if (ret)
Expand Down

0 comments on commit a91aff1

Please sign in to comment.