Skip to contentSkip to conversation

leds: oneshot - Allow default delay to be passed as an argument

PATCH New Amitesh Singh 1 participant 1 message Sep 3, 2016 LED

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 leds: oneshot - Allow default delay to be passed as an argument

This patch facilates the blink delay to be passed as an argument at the time of module loading. e.g.
insmod ledtrigg-oneshot.ko default_delay=100

---
 drivers/leds/trigger/ledtrig-oneshot.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/leds/trigger/ledtrig-oneshot.c +3 -0
index b8ea9f0..accb241 100644
@@ -22,6 +22,9 @@
 
 #define DEFAULT_DELAY 100
 
+static unsigned long default_delay = DEFAULT_DELAY;
+module_param(default_delay, ulong, S_IRUGO|S_IWUSR);
+
 struct oneshot_trig_data {
 	unsigned int invert;
 };
Signature · 6 lines
2.7.4

This patch facilates the blink delay to be passed as
    an argument at the time of module loading.
    e.g.
    insmod ledtrigg-oneshot.ko default_delay=100