Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

blink driver power saving

The blink driver wakes up every jiffies which wastes power unnecessarily.
Using a notifier gives same effect. Also add ability to unload module.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
[ We should really just delete the whole thing. The blink driver is
broken in many other ways too -Linus ]
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Stephen Hemminger and committed by
Linus Torvalds
0f4915b9 4710bcce

+20 -2
+20 -2
drivers/misc/blink.c
··· 16 16 add_timer(&blink_timer); 17 17 } 18 18 19 - static int blink_init(void) 19 + static int blink_panic_event(struct notifier_block *blk, 20 + unsigned long event, void *arg) 20 21 { 21 - printk(KERN_INFO "Enabling keyboard blinking\n"); 22 22 do_blink(0); 23 23 return 0; 24 24 } 25 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 + 26 43 module_init(blink_init); 44 + module_exit(blink_remove); 27 45