aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sys.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/sys.c')
-rw-r--r--kernel/sys.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/kernel/sys.c b/kernel/sys.c
index 08562f419768..14f8adcfffd9 100644
--- a/kernel/sys.c
+++ b/kernel/sys.c
@@ -804,6 +804,7 @@ static void kernel_restart_prepare(char *cmd)
804 blocking_notifier_call_chain(&reboot_notifier_list, SYS_RESTART, cmd); 804 blocking_notifier_call_chain(&reboot_notifier_list, SYS_RESTART, cmd);
805 system_state = SYSTEM_RESTART; 805 system_state = SYSTEM_RESTART;
806 device_shutdown(); 806 device_shutdown();
807 sysdev_shutdown();
807} 808}
808 809
809/** 810/**
@@ -860,6 +861,7 @@ void kernel_shutdown_prepare(enum system_states state)
860void kernel_halt(void) 861void kernel_halt(void)
861{ 862{
862 kernel_shutdown_prepare(SYSTEM_HALT); 863 kernel_shutdown_prepare(SYSTEM_HALT);
864 sysdev_shutdown();
863 printk(KERN_EMERG "System halted.\n"); 865 printk(KERN_EMERG "System halted.\n");
864 machine_halt(); 866 machine_halt();
865} 867}
@@ -876,6 +878,7 @@ void kernel_power_off(void)
876 kernel_shutdown_prepare(SYSTEM_POWER_OFF); 878 kernel_shutdown_prepare(SYSTEM_POWER_OFF);
877 if (pm_power_off_prepare) 879 if (pm_power_off_prepare)
878 pm_power_off_prepare(); 880 pm_power_off_prepare();
881 sysdev_shutdown();
879 printk(KERN_EMERG "Power down.\n"); 882 printk(KERN_EMERG "Power down.\n");
880 machine_power_off(); 883 machine_power_off();
881} 884}