diff options
| author | Lars-Peter Clausen <lars@metafoo.de> | 2012-07-04 16:02:56 -0400 |
|---|---|---|
| committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2012-07-04 16:12:19 -0400 |
| commit | 9b7e31bbf4bb58b12e11a7f24b7c3e48bbd2f4da (patch) | |
| tree | ca55c470f22dbccb53f3c3ed4683342cbd92c515 /drivers/input/misc | |
| parent | 1cecc5cc0658e128bcad0b29edb96f286066571d (diff) | |
Input: request threaded-only IRQs with IRQF_ONESHOT
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 input drivers where it is missing. Not modified by
this patch are those drivers where the requested IRQ will always be a
nested IRQ (e.g. because it's part of an MFD), since for this special
case IRQF_ONESHOT is not required to be specified when requesting the
IRQ.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input/misc')
| -rw-r--r-- | drivers/input/misc/ad714x.c | 8 | ||||
| -rw-r--r-- | drivers/input/misc/dm355evm_keys.c | 3 |
2 files changed, 7 insertions, 4 deletions
diff --git a/drivers/input/misc/ad714x.c b/drivers/input/misc/ad714x.c index 0ac75bbad4d6..2e5d5e1de647 100644 --- a/drivers/input/misc/ad714x.c +++ b/drivers/input/misc/ad714x.c | |||
| @@ -972,6 +972,7 @@ struct ad714x_chip *ad714x_probe(struct device *dev, u16 bus_type, int irq, | |||
| 972 | struct ad714x_platform_data *plat_data = dev->platform_data; | 972 | struct ad714x_platform_data *plat_data = dev->platform_data; |
| 973 | struct ad714x_chip *ad714x; | 973 | struct ad714x_chip *ad714x; |
| 974 | void *drv_mem; | 974 | void *drv_mem; |
| 975 | unsigned long irqflags; | ||
| 975 | 976 | ||
| 976 | struct ad714x_button_drv *bt_drv; | 977 | struct ad714x_button_drv *bt_drv; |
| 977 | struct ad714x_slider_drv *sd_drv; | 978 | struct ad714x_slider_drv *sd_drv; |
| @@ -1162,10 +1163,11 @@ struct ad714x_chip *ad714x_probe(struct device *dev, u16 bus_type, int irq, | |||
| 1162 | alloc_idx++; | 1163 | alloc_idx++; |
| 1163 | } | 1164 | } |
| 1164 | 1165 | ||
| 1166 | irqflags = plat_data->irqflags ?: IRQF_TRIGGER_FALLING; | ||
| 1167 | irqflags |= IRQF_ONESHOT; | ||
| 1168 | |||
| 1165 | error = request_threaded_irq(ad714x->irq, NULL, ad714x_interrupt_thread, | 1169 | error = request_threaded_irq(ad714x->irq, NULL, ad714x_interrupt_thread, |
| 1166 | plat_data->irqflags ? | 1170 | irqflags, "ad714x_captouch", ad714x); |
| 1167 | plat_data->irqflags : IRQF_TRIGGER_FALLING, | ||
| 1168 | "ad714x_captouch", ad714x); | ||
| 1169 | if (error) { | 1171 | if (error) { |
| 1170 | dev_err(dev, "can't allocate irq %d\n", ad714x->irq); | 1172 | dev_err(dev, "can't allocate irq %d\n", ad714x->irq); |
| 1171 | goto err_unreg_dev; | 1173 | goto err_unreg_dev; |
diff --git a/drivers/input/misc/dm355evm_keys.c b/drivers/input/misc/dm355evm_keys.c index 35083c6836c3..c1313d8535c3 100644 --- a/drivers/input/misc/dm355evm_keys.c +++ b/drivers/input/misc/dm355evm_keys.c | |||
| @@ -213,7 +213,8 @@ static int __devinit dm355evm_keys_probe(struct platform_device *pdev) | |||
| 213 | /* REVISIT: flush the event queue? */ | 213 | /* REVISIT: flush the event queue? */ |
| 214 | 214 | ||
| 215 | status = request_threaded_irq(keys->irq, NULL, dm355evm_keys_irq, | 215 | status = request_threaded_irq(keys->irq, NULL, dm355evm_keys_irq, |
| 216 | IRQF_TRIGGER_FALLING, dev_name(&pdev->dev), keys); | 216 | IRQF_TRIGGER_FALLING | IRQF_ONESHOT, |
| 217 | dev_name(&pdev->dev), keys); | ||
| 217 | if (status < 0) | 218 | if (status < 0) |
| 218 | goto fail2; | 219 | goto fail2; |
| 219 | 220 | ||
