From: Valentin Rothberg <Valentin.Rothberg@lip6.fr>
To: broonie@kernel.org, gregkh@linuxfoundation.org
Cc: linux-kernel@vger.kernel.org,
Valentin Rothberg <valentinrothberg@gmail.com>,
Valentin Rothberg <Valentin.Rothberg@lip6.fr>
Subject: [PATCH] regmap-irq: set IRQF_ONESHOT flag to ensure IRQ request
Date: Wed, 11 Feb 2015 15:55:28 +0100 [thread overview]
Message-ID: <1423666528-30623-1-git-send-email-Valentin.Rothberg@lip6.fr> (raw)
From: Valentin Rothberg <valentinrothberg@gmail.com>
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.
The %irq_flags flag is used to request the threaded IRQ and is also a
parameter of the caller. Hence, we cannot be sure that IRQF_ONESHOT is
set. This change avoids the potentially missing flag by setting
IRQF_ONESHOT when requesting the threaded IRQ.
Generated by: scripts/coccinelle/misc/irqf_oneshot.cocci
Signed-off-by: Valentin Rothberg <Valentin.Rothberg@lip6.fr>
---
drivers/base/regmap/regmap-irq.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/base/regmap/regmap-irq.c b/drivers/base/regmap/regmap-irq.c
index 6299a50..a6c3f75 100644
--- a/drivers/base/regmap/regmap-irq.c
+++ b/drivers/base/regmap/regmap-irq.c
@@ -499,7 +499,8 @@ int regmap_add_irq_chip(struct regmap *map, int irq, int irq_flags,
goto err_alloc;
}
- ret = request_threaded_irq(irq, NULL, regmap_irq_thread, irq_flags,
+ ret = request_threaded_irq(irq, NULL, regmap_irq_thread,
+ irq_flags | IRQF_ONESHOT,
chip->name, d);
if (ret != 0) {
dev_err(map->dev, "Failed to request IRQ %d for %s: %d\n",
--
1.9.1
next reply other threads:[~2015-02-11 15:03 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-11 14:55 Valentin Rothberg [this message]
2015-02-11 15:37 ` [PATCH v2] " Valentin Rothberg
2015-02-14 5:27 ` Mark Brown
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=1423666528-30623-1-git-send-email-Valentin.Rothberg@lip6.fr \
--to=valentin.rothberg@lip6.fr \
--cc=broonie@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=valentinrothberg@gmail.com \
/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
all inboxes | Powered by JetHome®