staging:iio: Request threaded-only IRQs with IRQF_ONESHOT
authorLars-Peter Clausen <lars@metafoo.de>
Mon, 2 Jul 2012 08:54:45 +0000 (10:54 +0200)
committerJonathan Cameron <jic23@kernel.org>
Sun, 8 Jul 2012 19:02:24 +0000 (20:02 +0100)
Since commit 1c6c69525b ("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>
drivers/staging/iio/accel/sca3000_core.c
drivers/staging/iio/adc/ad7816.c
drivers/staging/iio/adc/adt7310.c
drivers/staging/iio/adc/adt7410.c
drivers/staging/iio/cdc/ad7150.c

index 6ec5c204ff1dcf8e77c50b1883e4e0462eaa937d..c218d71abf1fcb12a4374864e0c8abf8791afa83 100644 (file)
@@ -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)
index 5356b091b08fcd9ff07680a2f541152d67ad512f..c5fb9476a2d1116f411b41a94b85796a693b7ff3 100644 (file)
@@ -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)
index e5f1ed7f86960568017507a3da13acb614fd524a..44dcf632f54d686e450c5bc88aeb5066157a8d4c 100644 (file)
@@ -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)
@@ -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)
index 917b6921e24d71f589f7e0bbf4b12bafd78adda1..a2defe64d10befdf7d50f10218848358e83928c4 100644 (file)
@@ -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)
@@ -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)
index a16d1a22db0ad1b52bd2f5fb953951c3e7eb4c39..6a4041417d4e26e89aa30f7cd26c0d70c4beac88 100644 (file)
@@ -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)
@@ -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)