Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753068AbbBKPDm (ORCPT ); Wed, 11 Feb 2015 10:03:42 -0500 Received: from osiris.lip6.fr ([132.227.60.30]:49705 "EHLO osiris.lip6.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752413AbbBKPDl (ORCPT ); Wed, 11 Feb 2015 10:03:41 -0500 X-Greylist: delayed 479 seconds by postgrey-1.27 at vger.kernel.org; Wed, 11 Feb 2015 10:03:40 EST X-pt: osiris.lip6.fr From: Valentin Rothberg To: broonie@kernel.org, gregkh@linuxfoundation.org Cc: linux-kernel@vger.kernel.org, Valentin Rothberg , Valentin Rothberg Subject: [PATCH] regmap-irq: set IRQF_ONESHOT flag to ensure IRQ request Date: Wed, 11 Feb 2015 15:55:28 +0100 Message-Id: <1423666528-30623-1-git-send-email-Valentin.Rothberg@lip6.fr> X-Mailer: git-send-email 1.9.1 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (osiris.lip6.fr [132.227.60.30]); Wed, 11 Feb 2015 15:55:35 +0100 (CET) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1563 Lines: 40 From: 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. 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 --- 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/