hc
2024-05-10 37f49e37ab4cb5d0bc4c60eb5c6d4dd57db767bb
kernel/include/linux/reboot.h
....@@ -49,9 +49,25 @@
4949 extern int unregister_restart_handler(struct notifier_block *);
5050 extern void do_kernel_restart(char *cmd);
5151
52
-extern int register_pre_restart_handler(struct notifier_block *);
53
-extern int unregister_pre_restart_handler(struct notifier_block *);
52
+#ifdef CONFIG_NO_GKI
53
+extern int register_pre_restart_handler(struct notifier_block *nb);
54
+extern int unregister_pre_restart_handler(struct notifier_block *nb);
5455 extern void do_kernel_pre_restart(char *cmd);
56
+#else
57
+static inline int register_pre_restart_handler(struct notifier_block *nb)
58
+{
59
+ return 0;
60
+}
61
+
62
+static inline int unregister_pre_restart_handler(struct notifier_block *nb)
63
+{
64
+ return 0;
65
+}
66
+
67
+static inline void do_kernel_pre_restart(char *cmd)
68
+{
69
+}
70
+#endif
5571
5672 /*
5773 * Architecture-specific implementations of sys_reboot commands.