]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/acpi/osl.c
[PATCH] nvidiafb: Add support for Geforce4 MX 4000
[linux-2.6-omap-h63xx.git] / drivers / acpi / osl.c
index 9127760d36c590765d72bfaa80363522da2f54cc..ac5bbaedac1ba7f15972881b1662081903ed2292 100644 (file)
@@ -67,7 +67,7 @@ EXPORT_SYMBOL(acpi_in_debugger);
 extern char line_buf[80];
 #endif                         /*ENABLE_DEBUGGER */
 
-int acpi_specific_hotkey_enabled;
+int acpi_specific_hotkey_enabled = TRUE;
 EXPORT_SYMBOL(acpi_specific_hotkey_enabled);
 
 static unsigned int acpi_irq_irq;
@@ -86,13 +86,11 @@ acpi_status acpi_os_initialize1(void)
         * Initialize PCI configuration space access, as we'll need to access
         * it while walking the namespace (bus 0 and root bridges w/ _BBNs).
         */
-#ifdef CONFIG_ACPI_PCI
        if (!raw_pci_ops) {
                printk(KERN_ERR PREFIX
                       "Access to PCI configuration space unavailable\n");
                return AE_NULL_ENTRY;
        }
-#endif
        kacpid_wq = create_singlethread_workqueue("kacpid");
        BUG_ON(!kacpid_wq);
 
@@ -206,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
@@ -315,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);
@@ -484,8 +483,6 @@ acpi_os_write_memory(acpi_physical_address phys_addr, u32 value, u32 width)
        return AE_OK;
 }
 
-#ifdef CONFIG_ACPI_PCI
-
 acpi_status
 acpi_os_read_pci_configuration(struct acpi_pci_id * pci_id, u32 reg,
                               void *value, u32 width)
@@ -618,30 +615,6 @@ void acpi_os_derive_pci_id(acpi_handle rhandle,    /* upper bound  */
        acpi_os_derive_pci_id_2(rhandle, chandle, id, &is_bridge, &bus_number);
 }
 
-#else                          /*!CONFIG_ACPI_PCI */
-
-acpi_status
-acpi_os_write_pci_configuration(struct acpi_pci_id * pci_id,
-                               u32 reg, acpi_integer value, u32 width)
-{
-       return AE_SUPPORT;
-}
-
-acpi_status
-acpi_os_read_pci_configuration(struct acpi_pci_id * pci_id,
-                              u32 reg, void *value, u32 width)
-{
-       return AE_SUPPORT;
-}
-
-void acpi_os_derive_pci_id(acpi_handle rhandle,        /* upper bound  */
-                          acpi_handle chandle, /* current node */
-                          struct acpi_pci_id **id)
-{
-}
-
-#endif                         /*CONFIG_ACPI_PCI */
-
 static void acpi_os_execute_deferred(void *context)
 {
        struct acpi_os_dpc *dpc = NULL;
@@ -865,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);
                        }
 
@@ -1068,13 +1040,13 @@ static int __init acpi_wake_gpes_always_on_setup(char *str)
 
 __setup("acpi_wake_gpes_always_on", acpi_wake_gpes_always_on_setup);
 
-int __init acpi_hotkey_setup(char *str)
+static int __init acpi_hotkey_setup(char *str)
 {
-       acpi_specific_hotkey_enabled = TRUE;
+       acpi_specific_hotkey_enabled = FALSE;
        return 1;
 }
 
-__setup("acpi_specific_hotkey", acpi_hotkey_setup);
+__setup("acpi_generic_hotkey", acpi_hotkey_setup);
 
 /*
  * max_cstate is defined in the base kernel so modules can
@@ -1088,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;
 }
@@ -1103,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);
 }