Thread (3 messages) 3 messages, 2 authors, 2016-02-16

[PATCH v3 2/3] fixup! Input: rotary_encoder - use threaded irqs

From: Uwe Kleine-König <hidden>
Date: 2016-02-05 12:08:20
Also in: linux-arm-kernel, linux-devicetree
Subsystem: input (keyboard, mouse, joystick, touchscreen) drivers, the rest · Maintainers: Dmitry Torokhov, Linus Torvalds

request_threaed_irq fails if handler == NULL and ONESHOT not in flags.
---
 drivers/input/misc/rotary_encoder.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/input/misc/rotary_encoder.c b/drivers/input/misc/rotary_encoder.c
index 309612a6d9f5..5a4e1d69c4af 100644
--- a/drivers/input/misc/rotary_encoder.c
+++ b/drivers/input/misc/rotary_encoder.c
@@ -296,7 +296,8 @@ static int rotary_encoder_probe(struct platform_device *pdev)
 	}
 
 	err = devm_request_threaded_irq(dev, encoder->irq_a, NULL, handler,
-				IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING,
+				IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING |
+				IRQF_ONESHOT,
 				DRV_NAME, encoder);
 	if (err) {
 		dev_err(dev, "unable to request IRQ %d\n", encoder->irq_a);
@@ -304,7 +305,8 @@ static int rotary_encoder_probe(struct platform_device *pdev)
 	}
 
 	err = devm_request_threaded_irq(dev, encoder->irq_b, NULL, handler,
-				IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING,
+				IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING |
+				IRQF_ONESHOT,
 				DRV_NAME, encoder);
 	if (err) {
 		dev_err(dev, "unable to request IRQ %d\n", encoder->irq_b);
-- 
2.7.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help