Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 43369
b: refs/heads/master
c: df58d03
h: refs/heads/master
i:
  43367: cefc515
v: v3
  • Loading branch information
Russell King authored and Russell King committed Nov 30, 2006
1 parent 19a02f4 commit f6ead00
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b729c09a452a659cdf4d29d83943aa798c5c4ffc
refs/heads/master: df58d0359581bbd4ee741406d81e69456c684f9d
9 changes: 8 additions & 1 deletion trunk/arch/arm/kernel/apm.c
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,7 @@ apm_ioctl(struct inode * inode, struct file *filp, u_int cmd, u_long arg)
wait_event(apm_suspend_waitqueue,
as->suspend_state == SUSPEND_DONE);
} else {
as->suspend_state = SUSPEND_WAIT;
up(&state_lock);

/*
Expand All @@ -349,8 +350,14 @@ apm_ioctl(struct inode * inode, struct file *filp, u_int cmd, u_long arg)
* acknowledged.
*/
err = queue_suspend_event(APM_USER_SUSPEND, as);
if (err < 0)
if (err < 0) {
/*
* Avoid taking the lock here - this
* should be fine.
*/
as->suspend_state = SUSPEND_NONE;
break;
}

if (err > 0)
apm_suspend();
Expand Down

0 comments on commit f6ead00

Please sign in to comment.