Fedora kernel-2.6.17-1.2142_FC4 patched with stable patch-2.6.17.4-vs2.0.2-rc26.diff
[linux-2.6.git] / drivers / acpi / events / evsci.c
index 46b3199..9a62216 100644 (file)
@@ -6,7 +6,7 @@
  ******************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2005, R. Byron Moore
+ * Copyright (C) 2000 - 2006, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
 #include <acpi/acpi.h>
 #include <acpi/acevents.h>
 
-
 #define _COMPONENT          ACPI_EVENTS
-        ACPI_MODULE_NAME    ("evsci")
+ACPI_MODULE_NAME("evsci")
 
+/* Local prototypes */
+static u32 ACPI_SYSTEM_XFACE acpi_ev_sci_xrupt_handler(void *context);
 
 /*******************************************************************************
  *
  *
  ******************************************************************************/
 
-static u32 ACPI_SYSTEM_XFACE
-acpi_ev_sci_xrupt_handler (
-       void                            *context)
+static u32 ACPI_SYSTEM_XFACE acpi_ev_sci_xrupt_handler(void *context)
 {
-       struct acpi_gpe_xrupt_info      *gpe_xrupt_list = context;
-       u32                             interrupt_handled = ACPI_INTERRUPT_NOT_HANDLED;
-
+       struct acpi_gpe_xrupt_info *gpe_xrupt_list = context;
+       u32 interrupt_handled = ACPI_INTERRUPT_NOT_HANDLED;
 
        ACPI_FUNCTION_TRACE("ev_sci_xrupt_handler");
 
-
        /*
         * We are guaranteed by the ACPI CA initialization/shutdown code that
         * if this interrupt handler is installed, ACPI is enabled.
@@ -83,18 +80,17 @@ acpi_ev_sci_xrupt_handler (
         * Fixed Events:
         * Check for and dispatch any Fixed Events that have occurred
         */
-       interrupt_handled |= acpi_ev_fixed_event_detect ();
+       interrupt_handled |= acpi_ev_fixed_event_detect();
 
        /*
         * General Purpose Events:
         * Check for and dispatch any GPEs that have occurred
         */
-       interrupt_handled |= acpi_ev_gpe_detect (gpe_xrupt_list);
+       interrupt_handled |= acpi_ev_gpe_detect(gpe_xrupt_list);
 
-       return_VALUE (interrupt_handled);
+       return_UINT32(interrupt_handled);
 }
 
-
 /*******************************************************************************
  *
  * FUNCTION:    acpi_ev_gpe_xrupt_handler
@@ -107,17 +103,13 @@ acpi_ev_sci_xrupt_handler (
  *
  ******************************************************************************/
 
-u32 ACPI_SYSTEM_XFACE
-acpi_ev_gpe_xrupt_handler (
-       void                            *context)
+u32 ACPI_SYSTEM_XFACE acpi_ev_gpe_xrupt_handler(void *context)
 {
-       struct acpi_gpe_xrupt_info      *gpe_xrupt_list = context;
-       u32                             interrupt_handled = ACPI_INTERRUPT_NOT_HANDLED;
-
+       struct acpi_gpe_xrupt_info *gpe_xrupt_list = context;
+       u32 interrupt_handled = ACPI_INTERRUPT_NOT_HANDLED;
 
        ACPI_FUNCTION_TRACE("ev_gpe_xrupt_handler");
 
-
        /*
         * We are guaranteed by the ACPI CA initialization/shutdown code that
         * if this interrupt handler is installed, ACPI is enabled.
@@ -127,12 +119,11 @@ acpi_ev_gpe_xrupt_handler (
         * GPEs:
         * Check for and dispatch any GPEs that have occurred
         */
-       interrupt_handled |= acpi_ev_gpe_detect (gpe_xrupt_list);
+       interrupt_handled |= acpi_ev_gpe_detect(gpe_xrupt_list);
 
-       return_VALUE (interrupt_handled);
+       return_UINT32(interrupt_handled);
 }
 
-
 /******************************************************************************
  *
  * FUNCTION:    acpi_ev_install_sci_handler
@@ -145,21 +136,18 @@ acpi_ev_gpe_xrupt_handler (
  *
  ******************************************************************************/
 
-u32
-acpi_ev_install_sci_handler (void)
+u32 acpi_ev_install_sci_handler(void)
 {
-       u32                             status = AE_OK;
+       u32 status = AE_OK;
 
+       ACPI_FUNCTION_TRACE("ev_install_sci_handler");
 
-       ACPI_FUNCTION_TRACE ("ev_install_sci_handler");
-
-
-       status = acpi_os_install_interrupt_handler ((u32) acpi_gbl_FADT->sci_int,
-                          acpi_ev_sci_xrupt_handler, acpi_gbl_gpe_xrupt_list_head);
-       return_ACPI_STATUS (status);
+       status = acpi_os_install_interrupt_handler((u32) acpi_gbl_FADT->sci_int,
+                                                  acpi_ev_sci_xrupt_handler,
+                                                  acpi_gbl_gpe_xrupt_list_head);
+       return_ACPI_STATUS(status);
 }
 
-
 /******************************************************************************
  *
  * FUNCTION:    acpi_ev_remove_sci_handler
@@ -179,21 +167,16 @@ acpi_ev_install_sci_handler (void)
  *
  ******************************************************************************/
 
-acpi_status
-acpi_ev_remove_sci_handler (void)
+acpi_status acpi_ev_remove_sci_handler(void)
 {
-       acpi_status                     status;
-
-
-       ACPI_FUNCTION_TRACE ("ev_remove_sci_handler");
+       acpi_status status;
 
+       ACPI_FUNCTION_TRACE("ev_remove_sci_handler");
 
        /* Just let the OS remove the handler and disable the level */
 
-       status = acpi_os_remove_interrupt_handler ((u32) acpi_gbl_FADT->sci_int,
-                          acpi_ev_sci_xrupt_handler);
+       status = acpi_os_remove_interrupt_handler((u32) acpi_gbl_FADT->sci_int,
+                                                 acpi_ev_sci_xrupt_handler);
 
-       return_ACPI_STATUS (status);
+       return_ACPI_STATUS(status);
 }
-
-