Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 58117
b: refs/heads/master
c: 0f4915b
h: refs/heads/master
i:
  58115: 0bac47e
v: v3
  • Loading branch information
Stephen Hemminger authored and Linus Torvalds committed Jul 1, 2007
1 parent 8b2353e commit 0129e94
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4710bcce8e02257c8a423b7a62ea81d0207582c8
refs/heads/master: 0f4915b9c5d7a35da11bfcff80ae6466cb7b9fc4
22 changes: 20 additions & 2 deletions trunk/drivers/misc/blink.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,30 @@ static void do_blink(unsigned long data)
add_timer(&blink_timer);
}

static int blink_init(void)
static int blink_panic_event(struct notifier_block *blk,
unsigned long event, void *arg)
{
printk(KERN_INFO "Enabling keyboard blinking\n");
do_blink(0);
return 0;
}

static struct notifier_block blink_notify = {
.notifier_call = blink_panic_event,
};

static __init int blink_init(void)
{
printk(KERN_INFO "Enabling keyboard blinking\n");
atomic_notifier_chain_register(&panic_notifier_list, &blink_notify);
return 0;
}

static __exit void blink_remove(void)
{
del_timer_sync(&blink_timer);
atomic_notifier_chain_unregister(&panic_notifier_list, &blink_notify);
}

module_init(blink_init);
module_exit(blink_remove);

0 comments on commit 0129e94

Please sign in to comment.