aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/osl.c
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2006-02-02 21:51:52 -0500
committerTrond Myklebust <Trond.Myklebust@netapp.com>2006-02-02 21:51:52 -0500
commit33052057e3e2db7f37fc78aa3f25c98f7e989fae (patch)
treee80a3aa1371f513c833dc94a16674f78faeeeb1d /drivers/acpi/osl.c
parent00b464debf0038b1628996065f0be564ccfbfd86 (diff)
parent1113a7e92e483074c6235da59460759e33b9b144 (diff)
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
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..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
1067unsigned long acpi_os_acquire_lock(acpi_handle handle) 1065acpi_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
1078void acpi_os_release_lock(acpi_handle handle, unsigned long flags) 1076void 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}