This source file includes following definitions.
- ledtrig_mtd_activity
- ledtrig_mtd_init
1
2
3
4
5
6
7
8
9
10
11
12
13
14 #include <linux/kernel.h>
15 #include <linux/init.h>
16 #include <linux/leds.h>
17
18 #define BLINK_DELAY 30
19
20 DEFINE_LED_TRIGGER(ledtrig_mtd);
21 DEFINE_LED_TRIGGER(ledtrig_nand);
22
23 void ledtrig_mtd_activity(void)
24 {
25 unsigned long blink_delay = BLINK_DELAY;
26
27 led_trigger_blink_oneshot(ledtrig_mtd,
28 &blink_delay, &blink_delay, 0);
29 led_trigger_blink_oneshot(ledtrig_nand,
30 &blink_delay, &blink_delay, 0);
31 }
32 EXPORT_SYMBOL(ledtrig_mtd_activity);
33
34 static int __init ledtrig_mtd_init(void)
35 {
36 led_trigger_register_simple("mtd", &ledtrig_mtd);
37 led_trigger_register_simple("nand-disk", &ledtrig_nand);
38
39 return 0;
40 }
41 device_initcall(ledtrig_mtd_init);