diff options
author | Valentin Rothberg <Valentin.Rothberg@lip6.fr> | 2015-02-11 10:37:57 -0500 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2015-02-14 00:26:36 -0500 |
commit | 09cadf6e088b59c335116bf0e2667486bc126c6a (patch) | |
tree | f16ca0a536c1a3b2b13fb8346b3a67474437da29 /drivers/base | |
parent | bfa76d49576599a4b9f9b7a71f23d73d6dcff735 (diff) |
regmap-irq: set IRQF_ONESHOT flag to ensure IRQ request
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>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/base')
-rw-r--r-- | drivers/base/regmap/regmap-irq.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/base/regmap/regmap-irq.c b/drivers/base/regmap/regmap-irq.c index 6299a50a5960..a6c3f75b4b01 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, | |||
499 | goto err_alloc; | 499 | goto err_alloc; |
500 | } | 500 | } |
501 | 501 | ||
502 | ret = request_threaded_irq(irq, NULL, regmap_irq_thread, irq_flags, | 502 | ret = request_threaded_irq(irq, NULL, regmap_irq_thread, |
503 | irq_flags | IRQF_ONESHOT, | ||
503 | chip->name, d); | 504 | chip->name, d); |
504 | if (ret != 0) { | 505 | if (ret != 0) { |
505 | dev_err(map->dev, "Failed to request IRQ %d for %s: %d\n", | 506 | dev_err(map->dev, "Failed to request IRQ %d for %s: %d\n", |