summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorPavel Machek <pavel@ucw.cz>2005-01-25 04:40:02 -0800
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-01-25 04:40:02 -0800
commit4cd821dfd8c1be920274f315e4823cb67df7df0a (patch)
treef2590d582b23bfa69d2c35dfbbf8fb8ff9bb4508 /kernel
parent88e195937f592e03aeb5431da4d841d9c91f3d13 (diff)
[PATCH] Enable swsusp on SMP machines
This enables swsusp on SMP machines. It should be working in 2.6.10, already (but you may need noapic in 2.6.10). Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/power/main.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/kernel/power/main.c b/kernel/power/main.c
index b7ef95c96230..0f78207cfb57 100644
--- a/kernel/power/main.c
+++ b/kernel/power/main.c
@@ -141,14 +141,14 @@ static int enter_state(suspend_state_t state)
if (down_trylock(&pm_sem))
return -EBUSY;
- /* Suspend is hard to get right on SMP. */
- if (num_online_cpus() != 1) {
- error = -EPERM;
+ if (state == PM_SUSPEND_DISK) {
+ error = pm_suspend_disk();
goto Unlock;
}
- if (state == PM_SUSPEND_DISK) {
- error = pm_suspend_disk();
+ /* Suspend is hard to get right on SMP. */
+ if (num_online_cpus() != 1) {
+ error = -EPERM;
goto Unlock;
}