Skip to content

Commit

Permalink
Input: tc3589x-keypad - set IRQF_ONESHOT flag to ensure IRQ request
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.

Currently, plat->irqtype is only set to IRQF_TRIGGER_FALLING.  This
patch sets the ONESHOT flag directly in request_threaded_irq() to
enforce the flag without being affected by future changes to
plat->irqtype.

Generated by: scripts/coccinelle/misc/irqf_oneshot.cocci

Signed-off-by: Valentin Rothberg <Valentin.Rothberg@lip6.fr>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
  • Loading branch information
Valentin Rothberg authored and Dmitry Torokhov committed Mar 4, 2015
1 parent 93050db commit 20f02d6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/input/keyboard/tc3589x-keypad.c
Original file line number Diff line number Diff line change
Expand Up @@ -411,9 +411,9 @@ static int tc3589x_keypad_probe(struct platform_device *pdev)

input_set_drvdata(input, keypad);

error = request_threaded_irq(irq, NULL,
tc3589x_keypad_irq, plat->irqtype,
"tc3589x-keypad", keypad);
error = request_threaded_irq(irq, NULL, tc3589x_keypad_irq,
plat->irqtype | IRQF_ONESHOT,
"tc3589x-keypad", keypad);
if (error < 0) {
dev_err(&pdev->dev,
"Could not allocate irq %d,error %d\n",
Expand Down

0 comments on commit 20f02d6

Please sign in to comment.