aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAndrey Smirnov <andrew.smirnov@gmail.com>2017-05-09 09:47:52 +1000
committerStephen Rothwell <sfr@canb.auug.org.au>2017-05-09 13:09:15 +1000
commitab67b2aad92b8644b43a069a0d7563fe3209a4d1 (patch)
tree13e143fd53385dea1087ef4084a4ea3332b907ed /include
parent70f8fa5a0c5d346bcda03fa8db1acda66a45f5f6 (diff)
kernel/reboot.c: add devm_register_reboot_notifier()
Add devm_* wrapper around register_reboot_notifier to simplify device specific reboot notifier registration/unregistration. Link: http://lkml.kernel.org/r/20170320171753.1705-1-andrew.smirnov@gmail.com Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/reboot.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/reboot.h b/include/linux/reboot.h
index a7ff409f386d..0ca25413ad2d 100644
--- a/include/linux/reboot.h
+++ b/include/linux/reboot.h
@@ -38,6 +38,9 @@ extern int reboot_force;
extern int register_reboot_notifier(struct notifier_block *);
extern int unregister_reboot_notifier(struct notifier_block *);
+struct device;
+extern int devm_register_reboot_notifier(struct device *, struct notifier_block *);
+
extern int register_restart_handler(struct notifier_block *);
extern int unregister_restart_handler(struct notifier_block *);
extern void do_kernel_restart(char *cmd);