Skip to content

Commit f2fa0fd

Browse files
t-8chakpm00
authored andcommitted
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/[email protected] Signed-off-by: Thomas Weißschuh <[email protected]> Cc: Greg Kroah-Hartman <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
1 parent 834b251 commit f2fa0fd

File tree

3 files changed

+7
-10
lines changed

3 files changed

+7
-10
lines changed

include/linux/notifier.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,5 @@ static inline int notifier_to_errno(int ret)
237237
#define KBD_KEYSYM 0x0004 /* Keyboard keysym */
238238
#define KBD_POST_KEYSYM 0x0005 /* Called after keyboard keysym interpretation */
239239

240-
extern struct blocking_notifier_head reboot_notifier_list;
241-
242240
#endif /* __KERNEL__ */
243241
#endif /* _LINUX_NOTIFIER_H */

kernel/notifier.c

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,10 @@
55
#include <linux/notifier.h>
66
#include <linux/rcupdate.h>
77
#include <linux/vmalloc.h>
8-
#include <linux/reboot.h>
98

109
#define CREATE_TRACE_POINTS
1110
#include <trace/events/notifier.h>
1211

13-
/*
14-
* Notifier list for kernel code which wants to be called
15-
* at shutdown. This is used to stop any idling DMA operations
16-
* and the like.
17-
*/
18-
BLOCKING_NOTIFIER_HEAD(reboot_notifier_list);
19-
2012
/*
2113
* Notifier chain core routines. The exported routines below
2214
* are layered on top of these, with appropriate locking added.

kernel/reboot.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,13 @@ static bool poweroff_fallback_to_halt;
7272
*/
7373
void __weak (*pm_power_off)(void);
7474

75+
/*
76+
* Notifier list for kernel code which wants to be called
77+
* at shutdown. This is used to stop any idling DMA operations
78+
* and the like.
79+
*/
80+
static BLOCKING_NOTIFIER_HEAD(reboot_notifier_list);
81+
7582
/**
7683
* emergency_restart - reboot the system
7784
*

0 commit comments

Comments
 (0)