summaryrefslogtreecommitdiff
path: root/drivers/acpi/osl.c
diff options
context:
space:
mode:
authorYu Luming <luming.yu@intel.com>2005-12-31 01:45:00 -0500
committerLen Brown <len.brown@intel.com>2006-01-03 16:27:21 -0500
commitdacd9b80355525be0e3c519687868410e304ad1c (patch)
treef0c897a51437c0e9b7d8d80874dd6a63f14b83f0 /drivers/acpi/osl.c
parent88026842b0a760145aa71d69e74fbc9ec118ca44 (diff)
[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 <luming.yu@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/osl.c')
-rw-r--r--drivers/acpi/osl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c
index e3cd0b16031a..8653dac01a76 100644
--- a/drivers/acpi/osl.c
+++ b/drivers/acpi/osl.c
@@ -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);
}