diff options
Diffstat (limited to 'drivers/leds')
-rw-r--r-- | drivers/leds/led-triggers.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/leds/led-triggers.c b/drivers/leds/led-triggers.c index c41eb6180c9c..4bebae733349 100644 --- a/drivers/leds/led-triggers.c +++ b/drivers/leds/led-triggers.c | |||
@@ -231,6 +231,26 @@ void led_trigger_event(struct led_trigger *trigger, | |||
231 | } | 231 | } |
232 | EXPORT_SYMBOL_GPL(led_trigger_event); | 232 | EXPORT_SYMBOL_GPL(led_trigger_event); |
233 | 233 | ||
234 | void led_trigger_blink(struct led_trigger *trigger, | ||
235 | unsigned long *delay_on, | ||
236 | unsigned long *delay_off) | ||
237 | { | ||
238 | struct list_head *entry; | ||
239 | |||
240 | if (!trigger) | ||
241 | return; | ||
242 | |||
243 | read_lock(&trigger->leddev_list_lock); | ||
244 | list_for_each(entry, &trigger->led_cdevs) { | ||
245 | struct led_classdev *led_cdev; | ||
246 | |||
247 | led_cdev = list_entry(entry, struct led_classdev, trig_list); | ||
248 | led_blink_set(led_cdev, delay_on, delay_off); | ||
249 | } | ||
250 | read_unlock(&trigger->leddev_list_lock); | ||
251 | } | ||
252 | EXPORT_SYMBOL_GPL(led_trigger_blink); | ||
253 | |||
234 | void led_trigger_register_simple(const char *name, struct led_trigger **tp) | 254 | void led_trigger_register_simple(const char *name, struct led_trigger **tp) |
235 | { | 255 | { |
236 | struct led_trigger *trigger; | 256 | struct led_trigger *trigger; |