diff options
Diffstat (limited to 'drivers/acpi/osl.c')
-rw-r--r-- | drivers/acpi/osl.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c index 20c9a37643c7..ac5bbaedac1b 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,13 +1060,11 @@ 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 | ||
1067 | unsigned long acpi_os_acquire_lock(acpi_handle handle) | 1065 | acpi_cpu_flags acpi_os_acquire_lock(acpi_handle handle) |
1068 | { | 1066 | { |
1069 | unsigned long flags; | 1067 | acpi_cpu_flags flags; |
1070 | spin_lock_irqsave((spinlock_t *) handle, flags); | 1068 | spin_lock_irqsave((spinlock_t *) handle, flags); |
1071 | return flags; | 1069 | return flags; |
1072 | } | 1070 | } |
@@ -1075,7 +1073,7 @@ 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 | ||
1078 | void acpi_os_release_lock(acpi_handle handle, unsigned long flags) | 1076 | void acpi_os_release_lock(acpi_handle handle, acpi_cpu_flags flags) |
1079 | { | 1077 | { |
1080 | spin_unlock_irqrestore((spinlock_t *) handle, flags); | 1078 | spin_unlock_irqrestore((spinlock_t *) handle, flags); |
1081 | } | 1079 | } |