Skip to content

Commit

Permalink
[ACPI] fix acpi_os_wait_sempahore() finite timeout case (AE_TIME warn…
Browse files Browse the repository at this point in the history
…ing)

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 <luming.yu@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
  • Loading branch information
Yu Luming authored and Len Brown committed Jan 3, 2006
1 parent 8802684 commit dacd9b8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/acpi/osl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit dacd9b8

Please sign in to comment.