From: Valentin Rothberg <Valentin.Rothberg@lip6.fr>
To: dmitry.torokhov@gmail.com, linus.walleij@linaro.org,
wsa@the-dreams.de, linux-input@vger.kernel.org,
linux-kernel@vger.kernel.org
Cc: Valentin Rothberg <Valentin.Rothberg@lip6.fr>
Subject: [PATCH] keyboard/tc3589x-keypad.c: set IRQF_ONESHOT flag to ensure IRQ request
Date: Mon, 2 Mar 2015 16:21:06 +0100 [thread overview]
Message-ID: <1425309666-18289-1-git-send-email-Valentin.Rothberg@lip6.fr> (raw)
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
next reply other threads:[~2015-03-02 15:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-02 15:21 Valentin Rothberg [this message]
2015-03-04 23:11 ` [PATCH] keyboard/tc3589x-keypad.c: set IRQF_ONESHOT flag to ensure IRQ request Dmitry Torokhov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1425309666-18289-1-git-send-email-Valentin.Rothberg@lip6.fr \
--to=valentin.rothberg@lip6.fr \
--cc=dmitry.torokhov@gmail.com \
--cc=linus.walleij@linaro.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=wsa@the-dreams.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox