提交 5cc19b7c 编写于 作者: N Nishanth Menon 提交者: Dmitry Torokhov

Input: palmas-pwrbutton - use IRQF_ONESHOT

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: adff5962 ("Input: introduce palmas-pwrbutton")
Reported-by: Nkbuild test robot <fengguang.wu@intel.com>
Signed-off-by: NNishanth Menon <nm@ti.com>
Signed-off-by: NDmitry Torokhov <dmitry.torokhov@gmail.com>
上级 3ace3686
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册