diff options
Diffstat (limited to 'kernel/sys.c')
-rw-r--r-- | kernel/sys.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/kernel/sys.c b/kernel/sys.c index af468edf096a..e4128b278f23 100644 --- a/kernel/sys.c +++ b/kernel/sys.c | |||
@@ -314,8 +314,8 @@ void kernel_restart_prepare(char *cmd) | |||
314 | { | 314 | { |
315 | blocking_notifier_call_chain(&reboot_notifier_list, SYS_RESTART, cmd); | 315 | blocking_notifier_call_chain(&reboot_notifier_list, SYS_RESTART, cmd); |
316 | system_state = SYSTEM_RESTART; | 316 | system_state = SYSTEM_RESTART; |
317 | usermodehelper_disable(); | ||
317 | device_shutdown(); | 318 | device_shutdown(); |
318 | sysdev_shutdown(); | ||
319 | syscore_shutdown(); | 319 | syscore_shutdown(); |
320 | } | 320 | } |
321 | 321 | ||
@@ -344,6 +344,7 @@ static void kernel_shutdown_prepare(enum system_states state) | |||
344 | blocking_notifier_call_chain(&reboot_notifier_list, | 344 | blocking_notifier_call_chain(&reboot_notifier_list, |
345 | (state == SYSTEM_HALT)?SYS_HALT:SYS_POWER_OFF, NULL); | 345 | (state == SYSTEM_HALT)?SYS_HALT:SYS_POWER_OFF, NULL); |
346 | system_state = state; | 346 | system_state = state; |
347 | usermodehelper_disable(); | ||
347 | device_shutdown(); | 348 | device_shutdown(); |
348 | } | 349 | } |
349 | /** | 350 | /** |
@@ -354,7 +355,6 @@ static void kernel_shutdown_prepare(enum system_states state) | |||
354 | void kernel_halt(void) | 355 | void kernel_halt(void) |
355 | { | 356 | { |
356 | kernel_shutdown_prepare(SYSTEM_HALT); | 357 | kernel_shutdown_prepare(SYSTEM_HALT); |
357 | sysdev_shutdown(); | ||
358 | syscore_shutdown(); | 358 | syscore_shutdown(); |
359 | printk(KERN_EMERG "System halted.\n"); | 359 | printk(KERN_EMERG "System halted.\n"); |
360 | kmsg_dump(KMSG_DUMP_HALT); | 360 | kmsg_dump(KMSG_DUMP_HALT); |
@@ -374,7 +374,6 @@ void kernel_power_off(void) | |||
374 | if (pm_power_off_prepare) | 374 | if (pm_power_off_prepare) |
375 | pm_power_off_prepare(); | 375 | pm_power_off_prepare(); |
376 | disable_nonboot_cpus(); | 376 | disable_nonboot_cpus(); |
377 | sysdev_shutdown(); | ||
378 | syscore_shutdown(); | 377 | syscore_shutdown(); |
379 | printk(KERN_EMERG "Power down.\n"); | 378 | printk(KERN_EMERG "Power down.\n"); |
380 | kmsg_dump(KMSG_DUMP_POWEROFF); | 379 | kmsg_dump(KMSG_DUMP_POWEROFF); |