diff options
author | Rafael J. Wysocki <rjw@sisk.pl> | 2007-07-26 16:29:55 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-26 21:13:06 +0200 |
commit | 58b3b71dfaaecbf7cff1fe10c049d663f0313e5f (patch) | |
tree | 38f34ce39e1c93d6d54730ead4e414a5070e3b45 /kernel/sys.c | |
parent | Revert most of "x86: Fix alternatives and kprobes to remap write-protected ke... (diff) | |
download | linux-58b3b71dfaaecbf7cff1fe10c049d663f0313e5f.tar.xz linux-58b3b71dfaaecbf7cff1fe10c049d663f0313e5f.zip |
Fix ThinkPad T42 poweroff failure introduced by by "PM: Introduce pm_power_off_prepare"
Commit bd804eba1c8597cbb7cd5a5f9fe886aae16a079a ("PM: Introduce
pm_power_off_prepare") caused problems in the poweroff path, as reported by
YOSHIFUJI Hideaki / 吉藤英明.
Generally, sysdev_shutdown() should be called after the ACPI preparation for
powering the system off. To make it happen, we can separate sysdev_shutdown()
from device_shutdown() and call it directly wherever necessary.
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Tested-by: YOSHIFUJI Hideaki / 吉藤英明 <yoshfuji@linux-ipv6.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/sys.c')
-rw-r--r-- | kernel/sys.c | 3 |
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) blocking_notifier_call_chain(&reboot_notifier_list, SYS_RESTART, cmd); system_state = SYSTEM_RESTART; device_shutdown(); + sysdev_shutdown(); } /** @@ -860,6 +861,7 @@ void kernel_shutdown_prepare(enum system_states state) void kernel_halt(void) { kernel_shutdown_prepare(SYSTEM_HALT); + sysdev_shutdown(); printk(KERN_EMERG "System halted.\n"); machine_halt(); } @@ -876,6 +878,7 @@ void kernel_power_off(void) kernel_shutdown_prepare(SYSTEM_POWER_OFF); if (pm_power_off_prepare) pm_power_off_prepare(); + sysdev_shutdown(); printk(KERN_EMERG "Power down.\n"); machine_power_off(); } |