summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorThomas Weißschuh <linux@weissschuh.net>2024-10-12 19:52:53 +0200
committerAndrew Morton <akpm@linux-foundation.org>2024-11-06 02:12:31 +0100
commitf2fa0fd4e7db8326a77618962714924b64f5f889 (patch)
tree204fb8c42b08b02dba47cc253e2ade1e88ce321d /kernel
parentresource: correct reallocate_resource() documentation (diff)
downloadlinux-f2fa0fd4e7db8326a77618962714924b64f5f889.tar.xz
linux-f2fa0fd4e7db8326a77618962714924b64f5f889.zip
reboot: move reboot_notifier_list to kernel/reboot.c
All the functions related to the reboot notifier list are in kernel/reboot.c. Move the list itself, too. As there are no direct users anymore, make the declaration static. Link: https://lkml.kernel.org/r/20241012-reboot_notifier_list-v1-1-6093bb9455ce@weissschuh.net Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/notifier.c8
-rw-r--r--kernel/reboot.c7
2 files changed, 7 insertions, 8 deletions
diff --git a/kernel/notifier.c b/kernel/notifier.c
index b3ce28f39eb6..2f9fe7c30287 100644
--- a/kernel/notifier.c
+++ b/kernel/notifier.c
@@ -5,19 +5,11 @@
#include <linux/notifier.h>
#include <linux/rcupdate.h>
#include <linux/vmalloc.h>
-#include <linux/reboot.h>
#define CREATE_TRACE_POINTS
#include <trace/events/notifier.h>
/*
- * Notifier list for kernel code which wants to be called
- * at shutdown. This is used to stop any idling DMA operations
- * and the like.
- */
-BLOCKING_NOTIFIER_HEAD(reboot_notifier_list);
-
-/*
* Notifier chain core routines. The exported routines below
* are layered on top of these, with appropriate locking added.
*/
diff --git a/kernel/reboot.c b/kernel/reboot.c
index f05dbde2c93f..ffdf86b717ab 100644
--- a/kernel/reboot.c
+++ b/kernel/reboot.c
@@ -72,6 +72,13 @@ static bool poweroff_fallback_to_halt;
*/
void __weak (*pm_power_off)(void);
+/*
+ * Notifier list for kernel code which wants to be called
+ * at shutdown. This is used to stop any idling DMA operations
+ * and the like.
+ */
+static BLOCKING_NOTIFIER_HEAD(reboot_notifier_list);
+
/**
* emergency_restart - reboot the system
*