public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
From: Valentin Rothberg <Valentin.Rothberg@lip6.fr>
To: sre@kernel.org, dbaryshkov@gmail.com, dwmw2@infradead.org,
	linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Valentin Rothberg <Valentin.Rothberg@lip6.fr>
Subject: [PATCH] power/smb347-charger.c: set IRQF_ONESHOT flag to ensure IRQ request
Date: Mon,  2 Mar 2015 15:32:48 +0100	[thread overview]
Message-ID: <1425306768-16140-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 may fail.

Generated by: scripts/coccinelle/misc/irqf_oneshot.cocci

Signed-off-by: Valentin Rothberg <Valentin.Rothberg@lip6.fr>
---
 drivers/power/smb347-charger.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/power/smb347-charger.c b/drivers/power/smb347-charger.c
index acf84e8..e9702de 100644
--- a/drivers/power/smb347-charger.c
+++ b/drivers/power/smb347-charger.c
@@ -842,7 +842,8 @@ static int smb347_irq_init(struct smb347_charger *smb,
 		goto fail;
 
 	ret = request_threaded_irq(irq, NULL, smb347_interrupt,
-				   IRQF_TRIGGER_FALLING, client->name, smb);
+				   IRQF_TRIGGER_FALLING | IRQF_ONESHOT,
+				   client->name, smb);
 	if (ret < 0)
 		goto fail_gpio;
 
-- 
1.9.1

             reply	other threads:[~2015-03-02 14:32 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-02 14:32 Valentin Rothberg [this message]
2015-03-07 18:42 ` [PATCH] power/smb347-charger.c: set IRQF_ONESHOT flag to ensure IRQ request Sebastian Reichel

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=1425306768-16140-1-git-send-email-Valentin.Rothberg@lip6.fr \
    --to=valentin.rothberg@lip6.fr \
    --cc=dbaryshkov@gmail.com \
    --cc=dwmw2@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=sre@kernel.org \
    /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