diff options
Diffstat (limited to 'kernel/sys.c')
-rw-r--r-- | kernel/sys.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/kernel/sys.c b/kernel/sys.c index 18da702ec813..1ad48b3b9068 100644 --- a/kernel/sys.c +++ b/kernel/sys.c | |||
@@ -37,6 +37,7 @@ | |||
37 | #include <linux/ptrace.h> | 37 | #include <linux/ptrace.h> |
38 | #include <linux/fs_struct.h> | 38 | #include <linux/fs_struct.h> |
39 | #include <linux/gfp.h> | 39 | #include <linux/gfp.h> |
40 | #include <linux/syscore_ops.h> | ||
40 | 41 | ||
41 | #include <linux/compat.h> | 42 | #include <linux/compat.h> |
42 | #include <linux/syscalls.h> | 43 | #include <linux/syscalls.h> |
@@ -298,6 +299,7 @@ void kernel_restart_prepare(char *cmd) | |||
298 | system_state = SYSTEM_RESTART; | 299 | system_state = SYSTEM_RESTART; |
299 | device_shutdown(); | 300 | device_shutdown(); |
300 | sysdev_shutdown(); | 301 | sysdev_shutdown(); |
302 | syscore_shutdown(); | ||
301 | } | 303 | } |
302 | 304 | ||
303 | /** | 305 | /** |
@@ -336,6 +338,7 @@ void kernel_halt(void) | |||
336 | { | 338 | { |
337 | kernel_shutdown_prepare(SYSTEM_HALT); | 339 | kernel_shutdown_prepare(SYSTEM_HALT); |
338 | sysdev_shutdown(); | 340 | sysdev_shutdown(); |
341 | syscore_shutdown(); | ||
339 | printk(KERN_EMERG "System halted.\n"); | 342 | printk(KERN_EMERG "System halted.\n"); |
340 | kmsg_dump(KMSG_DUMP_HALT); | 343 | kmsg_dump(KMSG_DUMP_HALT); |
341 | machine_halt(); | 344 | machine_halt(); |
@@ -355,6 +358,7 @@ void kernel_power_off(void) | |||
355 | pm_power_off_prepare(); | 358 | pm_power_off_prepare(); |
356 | disable_nonboot_cpus(); | 359 | disable_nonboot_cpus(); |
357 | sysdev_shutdown(); | 360 | sysdev_shutdown(); |
361 | syscore_shutdown(); | ||
358 | printk(KERN_EMERG "Power down.\n"); | 362 | printk(KERN_EMERG "Power down.\n"); |
359 | kmsg_dump(KMSG_DUMP_POWEROFF); | 363 | kmsg_dump(KMSG_DUMP_POWEROFF); |
360 | machine_power_off(); | 364 | machine_power_off(); |