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>
This commit is contained in:
committed by
Dmitry Torokhov
parent
1cecc5cc06
commit
9b7e31bbf4
@@ -972,6 +972,7 @@ struct ad714x_chip *ad714x_probe(struct device *dev, u16 bus_type, int irq,
|
||||
struct ad714x_platform_data *plat_data = dev->platform_data;
|
||||
struct ad714x_chip *ad714x;
|
||||
void *drv_mem;
|
||||
unsigned long irqflags;
|
||||
|
||||
struct ad714x_button_drv *bt_drv;
|
||||
struct ad714x_slider_drv *sd_drv;
|
||||
@@ -1162,10 +1163,11 @@ struct ad714x_chip *ad714x_probe(struct device *dev, u16 bus_type, int irq,
|
||||
alloc_idx++;
|
||||
}
|
||||
|
||||
irqflags = plat_data->irqflags ?: IRQF_TRIGGER_FALLING;
|
||||
irqflags |= IRQF_ONESHOT;
|
||||
|
||||
error = request_threaded_irq(ad714x->irq, NULL, ad714x_interrupt_thread,
|
||||
plat_data->irqflags ?
|
||||
plat_data->irqflags : IRQF_TRIGGER_FALLING,
|
||||
"ad714x_captouch", ad714x);
|
||||
irqflags, "ad714x_captouch", ad714x);
|
||||
if (error) {
|
||||
dev_err(dev, "can't allocate irq %d\n", ad714x->irq);
|
||||
goto err_unreg_dev;
|
||||
|
||||
@@ -213,7 +213,8 @@ static int __devinit dm355evm_keys_probe(struct platform_device *pdev)
|
||||
/* REVISIT: flush the event queue? */
|
||||
|
||||
status = request_threaded_irq(keys->irq, NULL, dm355evm_keys_irq,
|
||||
IRQF_TRIGGER_FALLING, dev_name(&pdev->dev), keys);
|
||||
IRQF_TRIGGER_FALLING | IRQF_ONESHOT,
|
||||
dev_name(&pdev->dev), keys);
|
||||
if (status < 0)
|
||||
goto fail2;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user