]> err.no Git - linux-2.6/blobdiff - drivers/acpi/events/evxface.c
ACPICA 20050617-0624 from Bob Moore <robert.moore@intel.com>
[linux-2.6] / drivers / acpi / events / evxface.c
index 0bfec10a5f1e90dc11e4b1616117b0244760671a..4c1c25e316a895593a0a38ba37576041b1dd4063 100644 (file)
@@ -64,6 +64,7 @@
  * DESCRIPTION: Saves the pointer to the handler function
  *
  ******************************************************************************/
+
 #ifdef ACPI_FUTURE_USAGE
 acpi_status
 acpi_install_exception_handler (
@@ -457,7 +458,8 @@ acpi_remove_notify_handler (
        /* Root Object */
 
        if (device == ACPI_ROOT_OBJECT) {
-               ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "Removing notify handler for ROOT object.\n"));
+               ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
+                       "Removing notify handler for ROOT object.\n"));
 
                if (((handler_type & ACPI_SYSTEM_NOTIFY) &&
                          !acpi_gbl_system_notify.handler)      ||
@@ -564,8 +566,9 @@ EXPORT_SYMBOL(acpi_remove_notify_handler);
  *
  * FUNCTION:    acpi_install_gpe_handler
  *
- * PARAMETERS:  gpe_number      - The GPE number within the GPE block
- *              gpe_block       - GPE block (NULL == FADT GPEs)
+ * PARAMETERS:  gpe_device      - Namespace node for the GPE (NULL for FADT
+ *                                defined GPEs)
+ *              gpe_number      - The GPE number within the GPE block
  *              Type            - Whether this GPE should be treated as an
  *                                edge- or level-triggered interrupt.
  *              Address         - Address of the handler
@@ -588,6 +591,7 @@ acpi_install_gpe_handler (
        struct acpi_gpe_event_info      *gpe_event_info;
        struct acpi_handler_info        *handler;
        acpi_status                     status;
+       u32                             flags;
 
 
        ACPI_FUNCTION_TRACE ("acpi_install_gpe_handler");
@@ -640,7 +644,7 @@ acpi_install_gpe_handler (
 
        /* Install the handler */
 
-       acpi_os_acquire_lock (acpi_gbl_gpe_lock, ACPI_NOT_ISR);
+       flags = acpi_os_acquire_lock (acpi_gbl_gpe_lock);
        gpe_event_info->dispatch.handler = handler;
 
        /* Setup up dispatch flags to indicate handler (vs. method) */
@@ -648,7 +652,7 @@ acpi_install_gpe_handler (
        gpe_event_info->flags &= ~(ACPI_GPE_XRUPT_TYPE_MASK | ACPI_GPE_DISPATCH_MASK); /* Clear bits */
        gpe_event_info->flags |= (u8) (type | ACPI_GPE_DISPATCH_HANDLER);
 
-       acpi_os_release_lock (acpi_gbl_gpe_lock, ACPI_NOT_ISR);
+       acpi_os_release_lock (acpi_gbl_gpe_lock, flags);
 
 
 unlock_and_exit:
@@ -662,8 +666,9 @@ EXPORT_SYMBOL(acpi_install_gpe_handler);
  *
  * FUNCTION:    acpi_remove_gpe_handler
  *
- * PARAMETERS:  gpe_number      - The event to remove a handler
- *              gpe_block       - GPE block (NULL == FADT GPEs)
+ * PARAMETERS:  gpe_device      - Namespace node for the GPE (NULL for FADT
+ *                                defined GPEs)
+ *              gpe_number      - The event to remove a handler
  *              Address         - Address of the handler
  *
  * RETURN:      Status
@@ -681,6 +686,7 @@ acpi_remove_gpe_handler (
        struct acpi_gpe_event_info      *gpe_event_info;
        struct acpi_handler_info        *handler;
        acpi_status                     status;
+       u32                             flags;
 
 
        ACPI_FUNCTION_TRACE ("acpi_remove_gpe_handler");
@@ -737,7 +743,7 @@ acpi_remove_gpe_handler (
 
        /* Remove the handler */
 
-       acpi_os_acquire_lock (acpi_gbl_gpe_lock, ACPI_NOT_ISR);
+       flags = acpi_os_acquire_lock (acpi_gbl_gpe_lock);
        handler = gpe_event_info->dispatch.handler;
 
        /* Restore Method node (if any), set dispatch flags */
@@ -747,7 +753,7 @@ acpi_remove_gpe_handler (
        if (handler->method_node) {
                gpe_event_info->flags |= ACPI_GPE_DISPATCH_METHOD;
        }
-       acpi_os_release_lock (acpi_gbl_gpe_lock, ACPI_NOT_ISR);
+       acpi_os_release_lock (acpi_gbl_gpe_lock, flags);
 
        /* Now we can free the handler object */
 
@@ -766,7 +772,8 @@ EXPORT_SYMBOL(acpi_remove_gpe_handler);
  * FUNCTION:    acpi_acquire_global_lock
  *
  * PARAMETERS:  Timeout         - How long the caller is willing to wait
- *              out_handle      - A handle to the lock if acquired
+ *              Handle          - Where the handle to the lock is returned
+ *                                (if acquired)
  *
  * RETURN:      Status
  *
@@ -812,7 +819,7 @@ EXPORT_SYMBOL(acpi_acquire_global_lock);
  *
  * RETURN:      Status
  *
- * DESCRIPTION: Release the ACPI Global Lock
+ * DESCRIPTION: Release the ACPI Global Lock. The handle must be valid.
  *
  ******************************************************************************/