diff options
author | Amerigo Wang <amwang@redhat.com> | 2011-07-25 20:13:10 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-07-25 23:57:14 -0400 |
commit | c5f41752fd37979dbaec61dc59c7ece0606ddf7e (patch) | |
tree | 47827a7fd86cbe4ad657d640b01e8b76535e8813 /kernel/notifier.c | |
parent | dcfe1421c916345b068f43749263b94270324500 (diff) |
notifiers: sys: move reboot notifiers into reboot.h
It is not necessary to share the same notifier.h.
This patch already moves register_reboot_notifier() and
unregister_reboot_notifier() from kernel/notifier.c to kernel/sys.c.
[amwang@redhat.com: make allyesconfig succeed on ppc64]
Signed-off-by: WANG Cong <amwang@redhat.com>
Cc: David Miller <davem@davemloft.net>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: WANG Cong <amwang@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/notifier.c')
-rw-r--r-- | kernel/notifier.c | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/kernel/notifier.c b/kernel/notifier.c index 2488ba7eb568..8d7b435806c9 100644 --- a/kernel/notifier.c +++ b/kernel/notifier.c | |||
@@ -525,37 +525,6 @@ void srcu_init_notifier_head(struct srcu_notifier_head *nh) | |||
525 | } | 525 | } |
526 | EXPORT_SYMBOL_GPL(srcu_init_notifier_head); | 526 | EXPORT_SYMBOL_GPL(srcu_init_notifier_head); |
527 | 527 | ||
528 | /** | ||
529 | * register_reboot_notifier - Register function to be called at reboot time | ||
530 | * @nb: Info about notifier function to be called | ||
531 | * | ||
532 | * Registers a function with the list of functions | ||
533 | * to be called at reboot time. | ||
534 | * | ||
535 | * Currently always returns zero, as blocking_notifier_chain_register() | ||
536 | * always returns zero. | ||
537 | */ | ||
538 | int register_reboot_notifier(struct notifier_block *nb) | ||
539 | { | ||
540 | return blocking_notifier_chain_register(&reboot_notifier_list, nb); | ||
541 | } | ||
542 | EXPORT_SYMBOL(register_reboot_notifier); | ||
543 | |||
544 | /** | ||
545 | * unregister_reboot_notifier - Unregister previously registered reboot notifier | ||
546 | * @nb: Hook to be unregistered | ||
547 | * | ||
548 | * Unregisters a previously registered reboot | ||
549 | * notifier function. | ||
550 | * | ||
551 | * Returns zero on success, or %-ENOENT on failure. | ||
552 | */ | ||
553 | int unregister_reboot_notifier(struct notifier_block *nb) | ||
554 | { | ||
555 | return blocking_notifier_chain_unregister(&reboot_notifier_list, nb); | ||
556 | } | ||
557 | EXPORT_SYMBOL(unregister_reboot_notifier); | ||
558 | |||
559 | static ATOMIC_NOTIFIER_HEAD(die_chain); | 528 | static ATOMIC_NOTIFIER_HEAD(die_chain); |
560 | 529 | ||
561 | int notrace __kprobes notify_die(enum die_val val, const char *str, | 530 | int notrace __kprobes notify_die(enum die_val val, const char *str, |