mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-31 12:10:52 -04:00
[ACPI] fix acpi_os_wait_sempahore() finite timeout case (AE_TIME warning)
Before this fix, the finite timeout case behaved like the no-timeout (trylock) case. http://bugzilla.kernel.org/show_bug.cgi?id=4588 Signed-off-by: Luming Yu <[email protected]> Signed-off-by: Len Brown <[email protected]>
This commit is contained in:
parent
88026842b0
commit
dacd9b8035
1 changed files with 1 additions and 1 deletions
|
|
@ -836,7 +836,7 @@ acpi_status acpi_os_wait_semaphore(acpi_handle handle, u32 units, u16 timeout)
|
|||
static const int quantum_ms = 1000 / HZ;
|
||||
|
||||
ret = down_trylock(sem);
|
||||
for (i = timeout; (i > 0 && ret < 0); i -= quantum_ms) {
|
||||
for (i = timeout; (i > 0 && ret != 0); i -= quantum_ms) {
|
||||
schedule_timeout_interruptible(1);
|
||||
ret = down_trylock(sem);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue