linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Input: palmas-pwrbutton: Fix IRQ flags for using threaded handler alone.
@ 2014-09-15 17:55 Nishanth Menon
  0 siblings, 0 replies; only message in thread
From: Nishanth Menon @ 2014-09-15 17:55 UTC (permalink / raw)
  To: Dmitry Torokhov
  Cc: kbuild, linux-kernel, linux-input, linux-omap, linux-arm-kernel,
	Nishanth Menon, Julia Lawal, Dan Carpenter

make C=2 CHECK="scripts/coccicheck" MODE=report COCCI=scripts/coccinelle/misc/irqf_oneshot.cocci ./drivers/input/misc/palmas-pwrbutton.o
Reports:
drivers/input/misc/palmas-pwrbutton.c:213:9-29: ERROR: Threaded IRQ with no primary handler requested without IRQF_ONESHOT

Palmas powerbutton just needs threaded IRQ handler since I2C
operations are involved and there is nothing in non-threaded primary
handler we could do.

So mark the request with ONESHOT as it should have been done in these
cases.

Cc: Julia Lawal <julia.lawall@lip6.fr>
Cc: Dan Carpenter <dan.carpenter@oracle.com>
Fixes: adff5962fdd2 ("Input: introduce palmas-pwrbutton")
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
---
 drivers/input/misc/palmas-pwrbutton.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/input/misc/palmas-pwrbutton.c b/drivers/input/misc/palmas-pwrbutton.c
index 4ed6f78..c0c4636 100644
--- a/drivers/input/misc/palmas-pwrbutton.c
+++ b/drivers/input/misc/palmas-pwrbutton.c
@@ -211,8 +211,8 @@ static int palmas_pwron_probe(struct platform_device *pdev)
 
 	pwron->irq = platform_get_irq(pdev, 0);
 	error = request_threaded_irq(pwron->irq, NULL, pwron_irq,
-				     IRQF_TRIGGER_HIGH | IRQF_TRIGGER_LOW,
-				     dev_name(dev), pwron);
+				     IRQF_TRIGGER_HIGH | IRQF_TRIGGER_LOW |
+				     IRQF_ONESHOT, dev_name(dev), pwron);
 	if (error) {
 		dev_err(dev, "Can't get IRQ for pwron: %d\n", error);
 		goto err_free_input;
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2014-09-15 17:55 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-15 17:55 [PATCH] Input: palmas-pwrbutton: Fix IRQ flags for using threaded handler alone Nishanth Menon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).