Skip to content

Commit

Permalink
Input: palmas-pwrbutton - use IRQF_ONESHOT
Browse files Browse the repository at this point in the history
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 power button 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.

Fixes: adff596 ("Input: introduce palmas-pwrbutton")
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
  • Loading branch information
Nishanth Menon authored and Dmitry Torokhov committed Sep 15, 2014
1 parent 3ace368 commit 5cc19b7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/input/misc/palmas-pwrbutton.c
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,9 @@ 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,
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);
Expand Down

0 comments on commit 5cc19b7

Please sign in to comment.