From e805845db6062621470fc8b76fe61966c34a2c45 Mon Sep 17 00:00:00 2001 From: Dmitry Osipenko <dmitry.osipenko@collabora.com> Date: Tue, 2 Nov 2021 16:57:08 +0300 Subject: [PATCH] reboot: Make restart notifier API private No users of the restart notifier API left, it's replaced with the sys-off handler based API. Make old restart API private to kernel/reboot. Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com> --- include/linux/reboot.h | 2 -- kernel/reboot.c | 6 ++---- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/include/linux/reboot.h b/include/linux/reboot.h index ba5e5dddcfcdf..501b9fafa26c6 100644 --- a/include/linux/reboot.h +++ b/include/linux/reboot.h @@ -70,8 +70,6 @@ extern int unregister_reboot_notifier(struct notifier_block *); 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); /* diff --git a/kernel/reboot.c b/kernel/reboot.c index f2f5c9d7caa0d..3053429df024a 100644 --- a/kernel/reboot.c +++ b/kernel/reboot.c @@ -173,7 +173,7 @@ static ATOMIC_NOTIFIER_HEAD(restart_handler_list); * Currently always returns zero, as atomic_notifier_chain_register() * always returns zero. */ -int register_restart_handler(struct notifier_block *nb) +static int register_restart_handler(struct notifier_block *nb) { int ret; @@ -192,7 +192,6 @@ int register_restart_handler(struct notifier_block *nb) return atomic_notifier_chain_register(&restart_handler_list, nb); } -EXPORT_SYMBOL(register_restart_handler); /** * unregister_restart_handler - Unregister previously registered @@ -203,11 +202,10 @@ EXPORT_SYMBOL(register_restart_handler); * * Returns zero on success, or %-ENOENT on failure. */ -int unregister_restart_handler(struct notifier_block *nb) +static int unregister_restart_handler(struct notifier_block *nb) { return atomic_notifier_chain_unregister(&restart_handler_list, nb); } -EXPORT_SYMBOL(unregister_restart_handler); /** * do_kernel_restart - Execute kernel restart handler call chain -- GitLab