aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/osl.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/osl.c')
-rw-r--r--drivers/acpi/osl.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c
index 20c9a37643c7..cc4a4903842a 100644
--- a/drivers/acpi/osl.c
+++ b/drivers/acpi/osl.c
@@ -838,7 +838,7 @@ acpi_status acpi_os_wait_semaphore(acpi_handle handle, u32 units, u16 timeout)
838 static const int quantum_ms = 1000 / HZ; 838 static const int quantum_ms = 1000 / HZ;
839 839
840 ret = down_trylock(sem); 840 ret = down_trylock(sem);
841 for (i = timeout; (i > 0 && ret < 0); i -= quantum_ms) { 841 for (i = timeout; (i > 0 && ret != 0); i -= quantum_ms) {
842 schedule_timeout_interruptible(1); 842 schedule_timeout_interruptible(1);
843 ret = down_trylock(sem); 843 ret = down_trylock(sem);
844 } 844 }
@@ -1060,11 +1060,9 @@ EXPORT_SYMBOL(max_cstate);
1060 * Acquire a spinlock. 1060 * Acquire a spinlock.
1061 * 1061 *
1062 * handle is a pointer to the spinlock_t. 1062 * handle is a pointer to the spinlock_t.
1063 * flags is *not* the result of save_flags - it is an ACPI-specific flag variable
1064 * that indicates whether we are at interrupt level.
1065 */ 1063 */
1066 1064
1067unsigned long acpi_os_acquire_lock(acpi_handle handle) 1065acpi_native_uint acpi_os_acquire_lock(acpi_handle handle)
1068{ 1066{
1069 unsigned long flags; 1067 unsigned long flags;
1070 spin_lock_irqsave((spinlock_t *) handle, flags); 1068 spin_lock_irqsave((spinlock_t *) handle, flags);
@@ -1075,9 +1073,9 @@ unsigned long acpi_os_acquire_lock(acpi_handle handle)
1075 * Release a spinlock. See above. 1073 * Release a spinlock. See above.
1076 */ 1074 */
1077 1075
1078void acpi_os_release_lock(acpi_handle handle, unsigned long flags) 1076void acpi_os_release_lock(acpi_handle handle, acpi_native_uint flags)
1079{ 1077{
1080 spin_unlock_irqrestore((spinlock_t *) handle, flags); 1078 spin_unlock_irqrestore((spinlock_t *) handle, (unsigned long) flags);
1081} 1079}
1082 1080
1083#ifndef ACPI_USE_LOCAL_CACHE 1081#ifndef ACPI_USE_LOCAL_CACHE