vserver 1.9.5.x5
[linux-2.6.git] / drivers / acpi / events / evxface.c
index 26e9b0e..a488201 100644 (file)
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2004, R. Byron Moore
+ * Copyright (C) 2000 - 2005, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -41,6 +41,7 @@
  * POSSIBILITY OF SUCH DAMAGES.
  */
 
+#include <linux/module.h>
 
 #include <acpi/acpi.h>
 #include <acpi/acnamesp.h>
         ACPI_MODULE_NAME    ("evxface")
 
 
+/*******************************************************************************
+ *
+ * FUNCTION:    acpi_install_exception_handler
+ *
+ * PARAMETERS:  Handler         - Pointer to the handler function for the
+ *                                event
+ *
+ * RETURN:      Status
+ *
+ * DESCRIPTION: Saves the pointer to the handler function
+ *
+ ******************************************************************************/
+#ifdef ACPI_FUTURE_USAGE
+acpi_status
+acpi_install_exception_handler (
+       acpi_exception_handler          handler)
+{
+       acpi_status                     status;
+
+
+       ACPI_FUNCTION_TRACE ("acpi_install_exception_handler");
+
+
+       status = acpi_ut_acquire_mutex (ACPI_MTX_EVENTS);
+       if (ACPI_FAILURE (status)) {
+               return_ACPI_STATUS (status);
+       }
+
+       /* Don't allow two handlers. */
+
+       if (acpi_gbl_exception_handler) {
+               status = AE_ALREADY_EXISTS;
+               goto cleanup;
+       }
+
+       /* Install the handler */
+
+       acpi_gbl_exception_handler = handler;
+
+cleanup:
+       (void) acpi_ut_release_mutex (ACPI_MTX_EVENTS);
+       return_ACPI_STATUS (status);
+}
+#endif  /*  ACPI_FUTURE_USAGE  */
+
+
 /*******************************************************************************
  *
  * FUNCTION:    acpi_install_fixed_event_handler
@@ -121,6 +168,7 @@ cleanup:
        (void) acpi_ut_release_mutex (ACPI_MTX_EVENTS);
        return_ACPI_STATUS (status);
 }
+EXPORT_SYMBOL(acpi_install_fixed_event_handler);
 
 
 /*******************************************************************************
@@ -178,6 +226,7 @@ acpi_remove_fixed_event_handler (
        (void) acpi_ut_release_mutex (ACPI_MTX_EVENTS);
        return_ACPI_STATUS (status);
 }
+EXPORT_SYMBOL(acpi_remove_fixed_event_handler);
 
 
 /*******************************************************************************
@@ -347,6 +396,7 @@ unlock_and_exit:
        (void) acpi_ut_release_mutex (ACPI_MTX_NAMESPACE);
        return_ACPI_STATUS (status);
 }
+EXPORT_SYMBOL(acpi_install_notify_handler);
 
 
 /*******************************************************************************
@@ -505,6 +555,7 @@ unlock_and_exit:
        (void) acpi_ut_release_mutex (ACPI_MTX_NAMESPACE);
        return_ACPI_STATUS (status);
 }
+EXPORT_SYMBOL(acpi_remove_notify_handler);
 
 
 /*******************************************************************************
@@ -602,6 +653,7 @@ unlock_and_exit:
        (void) acpi_ut_release_mutex (ACPI_MTX_EVENTS);
        return_ACPI_STATUS (status);
 }
+EXPORT_SYMBOL(acpi_install_gpe_handler);
 
 
 /*******************************************************************************
@@ -704,6 +756,7 @@ unlock_and_exit:
        (void) acpi_ut_release_mutex (ACPI_MTX_EVENTS);
        return_ACPI_STATUS (status);
 }
+EXPORT_SYMBOL(acpi_remove_gpe_handler);
 
 
 /*******************************************************************************
@@ -746,6 +799,7 @@ acpi_acquire_global_lock (
 
        return (status);
 }
+EXPORT_SYMBOL(acpi_acquire_global_lock);
 
 
 /*******************************************************************************
@@ -774,5 +828,5 @@ acpi_release_global_lock (
        status = acpi_ev_release_global_lock ();
        return (status);
 }
-
+EXPORT_SYMBOL(acpi_release_global_lock);