upgrade to fedora-2.6.12-1.1398.FC4 + vserver 2.0.rc7
[linux-2.6.git] / drivers / acpi / osl.c
index 5d8afd7..49181d9 100644 (file)
@@ -40,6 +40,7 @@
 #include <acpi/acpi.h>
 #include <asm/io.h>
 #include <acpi/acpi_bus.h>
+#include <acpi/processor.h>
 #include <asm/uaccess.h>
 
 #include <linux/efi.h>
@@ -356,7 +357,7 @@ acpi_os_get_timer (void)
        if (!t)
                printk(KERN_ERR PREFIX "acpi_os_get_timer() TBD\n");
 
-       return(++t);
+       return ++t;
 }
 
 acpi_status
@@ -562,7 +563,7 @@ acpi_os_write_pci_configuration (struct acpi_pci_id *pci_id, u32 reg, acpi_integ
 }
 
 /* TODO: Change code to take advantage of driver model more */
-void
+static void
 acpi_os_derive_pci_id_2 (
        acpi_handle             rhandle,        /* upper bound  */
        acpi_handle             chandle,        /* current node */
@@ -635,7 +636,7 @@ acpi_os_write_pci_configuration (
        acpi_integer            value,
        u32                     width)
 {
-       return (AE_SUPPORT);
+       return AE_SUPPORT;
 }
 
 acpi_status
@@ -645,7 +646,7 @@ acpi_os_read_pci_configuration (
        void                    *value,
        u32                     width)
 {
-       return (AE_SUPPORT);
+       return AE_SUPPORT;
 }
 
 void
@@ -937,7 +938,7 @@ acpi_os_wait_semaphore(
                // TODO: A better timeout algorithm?
                {
                        int i = 0;
-                       static const int quantum_ms = 1000/HZ;
+                       static const int quantum_ms = (HZ>1000)?1:(1000/HZ);
 
                        ret = down_trylock(sem);
                        for (i = timeout; (i > 0 && ret < 0); i -= quantum_ms) {
@@ -1070,7 +1071,7 @@ acpi_os_signal (
 }
 EXPORT_SYMBOL(acpi_os_signal);
 
-int __init
+static int __init
 acpi_os_name_setup(char *str)
 {
        char *p = acpi_os_name;
@@ -1100,7 +1101,7 @@ __setup("acpi_os_name=", acpi_os_name_setup);
  * empty string disables _OSI
  * TBD additional string adds to _OSI
  */
-int __init
+static int __init
 acpi_osi_setup(char *str)
 {
        if (str == NULL || *str == '\0') {
@@ -1118,7 +1119,7 @@ acpi_osi_setup(char *str)
 __setup("acpi_osi=", acpi_osi_setup);
 
 /* enable serialization to combat AE_ALREADY_EXISTS errors */
-int __init
+static int __init
 acpi_serialize_setup(char *str)
 {
        printk(KERN_INFO PREFIX "serialize enabled\n");
@@ -1139,7 +1140,7 @@ __setup("acpi_serialize", acpi_serialize_setup);
  * Run-time events on the same GPE this flag is available
  * to tell Linux to keep the wake-time GPEs enabled at run-time.
  */
-int __init
+static int __init
 acpi_wake_gpes_always_on_setup(char *str)
 {
        printk(KERN_INFO PREFIX "wake GPEs not disabled\n");
@@ -1155,7 +1156,7 @@ __setup("acpi_wake_gpes_always_on", acpi_wake_gpes_always_on_setup);
  * max_cstate is defined in the base kernel so modules can
  * change it w/o depending on the state of the processor module.
  */
-unsigned int max_cstate = ACPI_C_STATES_MAX;
+unsigned int max_cstate = ACPI_PROCESSOR_MAX_POWER;
 
 
 EXPORT_SYMBOL(max_cstate);