]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/acpi/dispatcher/dsmethod.c
ACPICA: Cosmetic changes only, no functional changes
[linux-2.6-omap-h63xx.git] / drivers / acpi / dispatcher / dsmethod.c
index 1cbe6190582494ed9f3557c58a17b659644f4979..7a99740248c7fa76e5196922311afba70c906c13 100644 (file)
@@ -42,7 +42,6 @@
  */
 
 #include <acpi/acpi.h>
-#include <acpi/acparser.h>
 #include <acpi/amlcode.h>
 #include <acpi/acdispat.h>
 #include <acpi/acinterp.h>
@@ -102,7 +101,7 @@ acpi_ds_method_error(acpi_status status, struct acpi_walk_state *walk_state)
                                                    walk_state->opcode,
                                                    walk_state->aml_offset,
                                                    NULL);
-               (void)acpi_ex_enter_interpreter();
+               acpi_ex_enter_interpreter();
        }
 #ifdef ACPI_DISASSEMBLER
        if (ACPI_FAILURE(status)) {
@@ -232,9 +231,9 @@ acpi_ds_begin_method_execution(struct acpi_namespace_node *method_node,
                 * recursive call.
                 */
                if (!walk_state ||
-                   !obj_desc->method.mutex->mutex.owner_thread ||
-                   (walk_state->thread !=
-                    obj_desc->method.mutex->mutex.owner_thread)) {
+                   !obj_desc->method.mutex->mutex.thread_id ||
+                   (walk_state->thread->thread_id !=
+                    obj_desc->method.mutex->mutex.thread_id)) {
                        /*
                         * Acquire the method mutex. This releases the interpreter if we
                         * block (and reacquires it before it returns)
@@ -254,8 +253,8 @@ acpi_ds_begin_method_execution(struct acpi_namespace_node *method_node,
                                    original_sync_level =
                                    walk_state->thread->current_sync_level;
 
-                               obj_desc->method.mutex->mutex.owner_thread =
-                                   walk_state->thread;
+                               obj_desc->method.mutex->mutex.thread_id =
+                                   walk_state->thread->thread_id;
                                walk_state->thread->current_sync_level =
                                    obj_desc->method.sync_level;
                        } else {
@@ -535,8 +534,6 @@ void
 acpi_ds_terminate_control_method(union acpi_operand_object *method_desc,
                                 struct acpi_walk_state *walk_state)
 {
-       struct acpi_namespace_node *method_node;
-       acpi_status status;
 
        ACPI_FUNCTION_TRACE_PTR(ds_terminate_control_method, walk_state);
 
@@ -551,34 +548,26 @@ acpi_ds_terminate_control_method(union acpi_operand_object *method_desc,
                /* Delete all arguments and locals */
 
                acpi_ds_method_data_delete_all(walk_state);
-       }
 
-       /*
-        * If method is serialized, release the mutex and restore the
-        * current sync level for this thread
-        */
-       if (method_desc->method.mutex) {
+               /*
+                * If method is serialized, release the mutex and restore the
+                * current sync level for this thread
+                */
+               if (method_desc->method.mutex) {
 
-               /* Acquisition Depth handles recursive calls */
+                       /* Acquisition Depth handles recursive calls */
 
-               method_desc->method.mutex->mutex.acquisition_depth--;
-               if (!method_desc->method.mutex->mutex.acquisition_depth) {
-                       walk_state->thread->current_sync_level =
-                           method_desc->method.mutex->mutex.
-                           original_sync_level;
+                       method_desc->method.mutex->mutex.acquisition_depth--;
+                       if (!method_desc->method.mutex->mutex.acquisition_depth) {
+                               walk_state->thread->current_sync_level =
+                                   method_desc->method.mutex->mutex.
+                                   original_sync_level;
 
-                       acpi_os_release_mutex(method_desc->method.mutex->mutex.
-                                             os_mutex);
-                       method_desc->method.mutex->mutex.owner_thread = NULL;
+                               acpi_os_release_mutex(method_desc->method.
+                                                     mutex->mutex.os_mutex);
+                               method_desc->method.mutex->mutex.thread_id = 0;
+                       }
                }
-       }
-
-       if (walk_state) {
-               /*
-                * Delete any objects created by this method during execution.
-                * The method Node is stored in the walk state
-                */
-               method_node = walk_state->method_node;
 
                /*
                 * Delete any namespace objects created anywhere within
@@ -620,7 +609,7 @@ acpi_ds_terminate_control_method(union acpi_operand_object *method_desc,
                 */
                if ((method_desc->method.method_flags & AML_METHOD_SERIALIZED)
                    && (!method_desc->method.mutex)) {
-                       status = acpi_ds_create_method_mutex(method_desc);
+                       (void)acpi_ds_create_method_mutex(method_desc);
                }
 
                /* No more threads, we can free the owner_id */