[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>
This commit is contained in:
Родитель
b729c09a45
Коммит
df58d03595
|
@ -340,6 +340,7 @@ apm_ioctl(struct inode * inode, struct file *filp, u_int cmd, u_long arg)
|
||||||
wait_event(apm_suspend_waitqueue,
|
wait_event(apm_suspend_waitqueue,
|
||||||
as->suspend_state == SUSPEND_DONE);
|
as->suspend_state == SUSPEND_DONE);
|
||||||
} else {
|
} else {
|
||||||
|
as->suspend_state = SUSPEND_WAIT;
|
||||||
up(&state_lock);
|
up(&state_lock);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -349,8 +350,14 @@ apm_ioctl(struct inode * inode, struct file *filp, u_int cmd, u_long arg)
|
||||||
* acknowledged.
|
* acknowledged.
|
||||||
*/
|
*/
|
||||||
err = queue_suspend_event(APM_USER_SUSPEND, as);
|
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;
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
if (err > 0)
|
if (err > 0)
|
||||||
apm_suspend();
|
apm_suspend();
|
||||||
|
|
Загрузка…
Ссылка в новой задаче