]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/acpi/osl.c
[PATCH] libata: make code actually compile with debugging on
[linux-2.6-omap-h63xx.git] / drivers / acpi / osl.c
index d528c750a3801bd65591639baec49d3f64a381fe..ac5bbaedac1ba7f15972881b1662081903ed2292 100644 (file)
@@ -204,11 +204,13 @@ acpi_os_map_memory(acpi_physical_address phys, acpi_size size,
 
        return AE_OK;
 }
+EXPORT_SYMBOL_GPL(acpi_os_map_memory);
 
 void acpi_os_unmap_memory(void __iomem * virt, acpi_size size)
 {
        iounmap(virt);
 }
+EXPORT_SYMBOL_GPL(acpi_os_unmap_memory);
 
 #ifdef ACPI_FUTURE_USAGE
 acpi_status
@@ -313,8 +315,7 @@ acpi_status acpi_os_remove_interrupt_handler(u32 irq, acpi_osd_handler handler)
 
 void acpi_os_sleep(acpi_integer ms)
 {
-       current->state = TASK_INTERRUPTIBLE;
-       schedule_timeout(((signed long)ms * HZ) / 1000);
+       schedule_timeout_interruptible(msecs_to_jiffies(ms));
 }
 
 EXPORT_SYMBOL(acpi_os_sleep);
@@ -837,9 +838,8 @@ 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) {
-                               current->state = TASK_INTERRUPTIBLE;
-                               schedule_timeout(1);
+                       for (i = timeout; (i > 0 && ret != 0); i -= quantum_ms) {
+                               schedule_timeout_interruptible(1);
                                ret = down_trylock(sem);
                        }
 
@@ -1060,13 +1060,11 @@ EXPORT_SYMBOL(max_cstate);
  * Acquire a spinlock.
  *
  * handle is a pointer to the spinlock_t.
- * flags is *not* the result of save_flags - it is an ACPI-specific flag variable
- *   that indicates whether we are at interrupt level.
  */
 
-unsigned long acpi_os_acquire_lock(acpi_handle handle)
+acpi_cpu_flags acpi_os_acquire_lock(acpi_handle handle)
 {
-       unsigned long flags;
+       acpi_cpu_flags flags;
        spin_lock_irqsave((spinlock_t *) handle, flags);
        return flags;
 }
@@ -1075,7 +1073,7 @@ unsigned long acpi_os_acquire_lock(acpi_handle handle)
  * Release a spinlock. See above.
  */
 
-void acpi_os_release_lock(acpi_handle handle, unsigned long flags)
+void acpi_os_release_lock(acpi_handle handle, acpi_cpu_flags flags)
 {
        spin_unlock_irqrestore((spinlock_t *) handle, flags);
 }