* [PATCH] keyboard/tc3589x-keypad.c: set IRQF_ONESHOT flag to ensure IRQ request
@ 2015-03-02 15:21 Valentin Rothberg
2015-03-04 23:11 ` Dmitry Torokhov
0 siblings, 1 reply; 2+ messages in thread
From: Valentin Rothberg @ 2015-03-02 15:21 UTC (permalink / raw)
To: dmitry.torokhov, linus.walleij, wsa, linux-input, linux-kernel
Cc: Valentin Rothberg
Since commit 1c6c69525b40eb76de8adf039409722015927dc3 ("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>
---
drivers/input/keyboard/tc3589x-keypad.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/input/keyboard/tc3589x-keypad.c b/drivers/input/keyboard/tc3589x-keypad.c
index 8ff612d..5639325 100644
--- a/drivers/input/keyboard/tc3589x-keypad.c
+++ b/drivers/input/keyboard/tc3589x-keypad.c
@@ -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",
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] keyboard/tc3589x-keypad.c: set IRQF_ONESHOT flag to ensure IRQ request
2015-03-02 15:21 [PATCH] keyboard/tc3589x-keypad.c: set IRQF_ONESHOT flag to ensure IRQ request Valentin Rothberg
@ 2015-03-04 23:11 ` Dmitry Torokhov
0 siblings, 0 replies; 2+ messages in thread
From: Dmitry Torokhov @ 2015-03-04 23:11 UTC (permalink / raw)
To: Valentin Rothberg; +Cc: linus.walleij, wsa, linux-input, linux-kernel
On Mon, Mar 02, 2015 at 04:21:06PM +0100, Valentin Rothberg wrote:
> Since commit 1c6c69525b40eb76de8adf039409722015927dc3 ("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>
Applied, thank you.
> ---
> drivers/input/keyboard/tc3589x-keypad.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/input/keyboard/tc3589x-keypad.c b/drivers/input/keyboard/tc3589x-keypad.c
> index 8ff612d..5639325 100644
> --- a/drivers/input/keyboard/tc3589x-keypad.c
> +++ b/drivers/input/keyboard/tc3589x-keypad.c
> @@ -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",
> --
> 1.9.1
>
--
Dmitry
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-03-04 23:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-02 15:21 [PATCH] keyboard/tc3589x-keypad.c: set IRQF_ONESHOT flag to ensure IRQ request Valentin Rothberg
2015-03-04 23:11 ` Dmitry Torokhov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox