aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorRussell King <rmk@dyn-67.arm.linux.org.uk>2006-11-07 16:01:30 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2006-11-30 07:24:45 -0500
commitdf58d0359581bbd4ee741406d81e69456c684f9d (patch)
tree3452ee043e7a15c1855703d6e9b2a0e6b49f6113 /arch
parentb729c09a452a659cdf4d29d83943aa798c5c4ffc (diff)
[ARM] Fix "apm -s" command hang
Fix an apparant hang with the "apm -s" command. We omitted to wake up this process once resume had completed. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/kernel/apm.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/arch/arm/kernel/apm.c b/arch/arm/kernel/apm.c
index bbe98e3b860b..845af0bc1108 100644
--- a/arch/arm/kernel/apm.c
+++ b/arch/arm/kernel/apm.c
@@ -340,6 +340,7 @@ apm_ioctl(struct inode * inode, struct file *filp, u_int cmd, u_long arg)
340 wait_event(apm_suspend_waitqueue, 340 wait_event(apm_suspend_waitqueue,
341 as->suspend_state == SUSPEND_DONE); 341 as->suspend_state == SUSPEND_DONE);
342 } else { 342 } else {
343 as->suspend_state = SUSPEND_WAIT;
343 up(&state_lock); 344 up(&state_lock);
344 345
345 /* 346 /*
@@ -349,8 +350,14 @@ apm_ioctl(struct inode * inode, struct file *filp, u_int cmd, u_long arg)
349 * acknowledged. 350 * acknowledged.
350 */ 351 */
351 err = queue_suspend_event(APM_USER_SUSPEND, as); 352 err = queue_suspend_event(APM_USER_SUSPEND, as);
352 if (err < 0) 353 if (err < 0) {
354 /*
355 * Avoid taking the lock here - this
356 * should be fine.
357 */
358 as->suspend_state = SUSPEND_NONE;
353 break; 359 break;
360 }
354 361
355 if (err > 0) 362 if (err > 0)
356 apm_suspend(); 363 apm_suspend();