[OpenWrt-Devel] [PATCH v2 6/8] generic: replace request_irq by request_threaded_irq to fix non working ledtrig-gpio

Günther Kelleter guenther.kelleter at devolo.de
Thu Jul 2 07:47:21 EDT 2015


Signed-off-by: Günther Kelleter <guenther.kelleter at devolo.de>
---
 .../835-fix-irq-request-ledtrig-gpio.patch            | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
 create mode 100644 target/linux/generic/patches-3.18/835-fix-irq-request-ledtrig-gpio.patch

diff --git a/target/linux/generic/patches-3.18/835-fix-irq-request-ledtrig-gpio.patch b/target/linux/generic/patches-3.18/835-fix-irq-request-ledtrig-gpio.patch
new file mode 100644
index 0000000..6378073
--- /dev/null
+++ b/target/linux/generic/patches-3.18/835-fix-irq-request-ledtrig-gpio.patch
@@ -0,0 +1,19 @@
+--- a/drivers/leds/trigger/ledtrig-gpio.c
++++ b/drivers/leds/trigger/ledtrig-gpio.c
+@@ -161,9 +161,13 @@ static ssize_t gpio_trig_gpio_store(stru
+ 		return n;
+ 	}
+ 
+-	ret = request_irq(gpio_to_irq(gpio), gpio_trig_irq,
+-			IRQF_SHARED | IRQF_TRIGGER_RISING
+-			| IRQF_TRIGGER_FALLING, "ledtrig-gpio", led);
++	ret = request_threaded_irq(
++		gpio_to_irq(gpio), 
++		NULL,
++		gpio_trig_irq,
++		IRQF_SHARED | IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING,
++		"ledtrig-gpio", 
++		led);
+ 	if (ret) {
+ 		dev_err(dev, "request_irq failed with error %d\n", ret);
+ 	} else {
-- 
2.4.4.88.gac2ab0d
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list