diff options
Diffstat (limited to 'drivers/misc/blink.c')
-rw-r--r-- | drivers/misc/blink.c | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/drivers/misc/blink.c b/drivers/misc/blink.c deleted file mode 100644 index 97f7253ce2d3..000000000000 --- a/drivers/misc/blink.c +++ /dev/null | |||
@@ -1,45 +0,0 @@ | |||
1 | #include <linux/kernel.h> | ||
2 | #include <linux/module.h> | ||
3 | #include <linux/timer.h> | ||
4 | #include <linux/jiffies.h> | ||
5 | |||
6 | static void do_blink(unsigned long data); | ||
7 | |||
8 | static DEFINE_TIMER(blink_timer, do_blink, 0 ,0); | ||
9 | |||
10 | static void do_blink(unsigned long data) | ||
11 | { | ||
12 | static long count; | ||
13 | if (panic_blink) | ||
14 | panic_blink(count++); | ||
15 | blink_timer.expires = jiffies + msecs_to_jiffies(1); | ||
16 | add_timer(&blink_timer); | ||
17 | } | ||
18 | |||
19 | static int blink_panic_event(struct notifier_block *blk, | ||
20 | unsigned long event, void *arg) | ||
21 | { | ||
22 | do_blink(0); | ||
23 | return 0; | ||
24 | } | ||
25 | |||
26 | static struct notifier_block blink_notify = { | ||
27 | .notifier_call = blink_panic_event, | ||
28 | }; | ||
29 | |||
30 | static __init int blink_init(void) | ||
31 | { | ||
32 | printk(KERN_INFO "Enabling keyboard blinking\n"); | ||
33 | atomic_notifier_chain_register(&panic_notifier_list, &blink_notify); | ||
34 | return 0; | ||
35 | } | ||
36 | |||
37 | static __exit void blink_remove(void) | ||
38 | { | ||
39 | del_timer_sync(&blink_timer); | ||
40 | atomic_notifier_chain_unregister(&panic_notifier_list, &blink_notify); | ||
41 | } | ||
42 | |||
43 | module_init(blink_init); | ||
44 | module_exit(blink_remove); | ||
45 | |||