diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-10-25 06:03:58 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-10-25 06:03:58 -0400 |
commit | 73692d9bb58ecc2fa73f4b2bfcf6eadaa6d49a26 (patch) | |
tree | 7a7b6cb22d1edaec10c3ae9d961b6e04c37d380c /drivers | |
parent | 31dced41c6822ce751c033a53502ea4d8d399422 (diff) | |
parent | 1d927c3b5a4005a2ebc5356e7e1eec436e15fa22 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/apm
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/apm:
apm-emulation: use wait_event_freezable() instead of freezer_[do_not_]count()
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/char/apm-emulation.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/drivers/char/apm-emulation.c b/drivers/char/apm-emulation.c index a7346ab97a3c..2a2b8fd708c1 100644 --- a/drivers/char/apm-emulation.c +++ b/drivers/char/apm-emulation.c | |||
@@ -300,17 +300,13 @@ apm_ioctl(struct file *filp, u_int cmd, u_long arg) | |||
300 | /* | 300 | /* |
301 | * Wait for the suspend/resume to complete. If there | 301 | * Wait for the suspend/resume to complete. If there |
302 | * are pending acknowledges, we wait here for them. | 302 | * are pending acknowledges, we wait here for them. |
303 | * wait_event_freezable() is interruptible and pending | ||
304 | * signal can cause busy looping. We aren't doing | ||
305 | * anything critical, chill a bit on each iteration. | ||
303 | */ | 306 | */ |
304 | freezer_do_not_count(); | 307 | while (wait_event_freezable(apm_suspend_waitqueue, |
305 | 308 | as->suspend_state == SUSPEND_DONE)) | |
306 | wait_event(apm_suspend_waitqueue, | 309 | msleep(10); |
307 | as->suspend_state == SUSPEND_DONE); | ||
308 | |||
309 | /* | ||
310 | * Since we are waiting until the suspend is done, the | ||
311 | * try_to_freeze() in freezer_count() will not trigger | ||
312 | */ | ||
313 | freezer_count(); | ||
314 | break; | 310 | break; |
315 | case SUSPEND_ACKTO: | 311 | case SUSPEND_ACKTO: |
316 | as->suspend_result = -ETIMEDOUT; | 312 | as->suspend_result = -ETIMEDOUT; |