diff options
Diffstat (limited to 'kernel/sys.c')
-rw-r--r-- | kernel/sys.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/kernel/sys.c b/kernel/sys.c index 1e1f41b3fdf6..3e332131000e 100644 --- a/kernel/sys.c +++ b/kernel/sys.c | |||
@@ -376,18 +376,21 @@ void emergency_restart(void) | |||
376 | } | 376 | } |
377 | EXPORT_SYMBOL_GPL(emergency_restart); | 377 | EXPORT_SYMBOL_GPL(emergency_restart); |
378 | 378 | ||
379 | /** | ||
380 | * kernel_restart - reboot the system | ||
381 | * | ||
382 | * Shutdown everything and perform a clean reboot. | ||
383 | * This is not safe to call in interrupt context. | ||
384 | */ | ||
385 | void kernel_restart_prepare(char *cmd) | 379 | void kernel_restart_prepare(char *cmd) |
386 | { | 380 | { |
387 | notifier_call_chain(&reboot_notifier_list, SYS_RESTART, cmd); | 381 | notifier_call_chain(&reboot_notifier_list, SYS_RESTART, cmd); |
388 | system_state = SYSTEM_RESTART; | 382 | system_state = SYSTEM_RESTART; |
389 | device_shutdown(); | 383 | device_shutdown(); |
390 | } | 384 | } |
385 | |||
386 | /** | ||
387 | * kernel_restart - reboot the system | ||
388 | * @cmd: pointer to buffer containing command to execute for restart | ||
389 | * or NULL | ||
390 | * | ||
391 | * Shutdown everything and perform a clean reboot. | ||
392 | * This is not safe to call in interrupt context. | ||
393 | */ | ||
391 | void kernel_restart(char *cmd) | 394 | void kernel_restart(char *cmd) |
392 | { | 395 | { |
393 | kernel_restart_prepare(cmd); | 396 | kernel_restart_prepare(cmd); |