From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755190AbbCBPVR (ORCPT ); Mon, 2 Mar 2015 10:21:17 -0500 Received: from osiris.lip6.fr ([132.227.60.30]:53252 "EHLO osiris.lip6.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753944AbbCBPVQ (ORCPT ); Mon, 2 Mar 2015 10:21:16 -0500 X-pt: osiris.lip6.fr From: Valentin Rothberg 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 Subject: [PATCH] keyboard/tc3589x-keypad.c: set IRQF_ONESHOT flag to ensure IRQ request Date: Mon, 2 Mar 2015 16:21:06 +0100 Message-Id: <1425309666-18289-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]); Mon, 02 Mar 2015 16:21:12 +0100 (CET) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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