]> err.no Git - linux-2.6/blobdiff - drivers/acpi/executer/exmutex.c
Merge branches 'at91', 'dyntick', 'ep93xx', 'iop', 'ixp', 'misc', 'orion', 'omap...
[linux-2.6] / drivers / acpi / executer / exmutex.c
index 7c70938eef89fc1090ebf13fc7a10decc2304fa9..a8bf3d713e2821db5c6e32588f4cc52f38e326bc 100644 (file)
@@ -6,7 +6,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2007, R. Byron Moore
+ * Copyright (C) 2000 - 2008, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -85,7 +85,6 @@ void acpi_ex_unlink_mutex(union acpi_operand_object *obj_desc)
        } else {
                thread->acquired_mutex_list = obj_desc->mutex.next;
        }
-       return;
 }
 
 /*******************************************************************************
@@ -299,17 +298,6 @@ acpi_status acpi_ex_release_mutex_object(union acpi_operand_object *obj_desc)
                return (AE_NOT_ACQUIRED);
        }
 
-       /* No obj_desc->Mutex.owner_thread for Global Lock */
-
-       /*
-        * Mutex to be released must be at the head of acquired list to prevent
-        * deadlock. (The head of the list is the last mutex acquired.)
-        */
-       if (obj_desc->mutex.owner_thread &&
-           (obj_desc != obj_desc->mutex.owner_thread->acquired_mutex_list)) {
-               return (AE_AML_MUTEX_ORDER);
-       }
-
        /* Match multiple Acquires with multiple Releases */
 
        obj_desc->mutex.acquisition_depth--;
@@ -338,7 +326,7 @@ acpi_status acpi_ex_release_mutex_object(union acpi_operand_object *obj_desc)
 
        /* Clear mutex info */
 
-       obj_desc->mutex.thread_id = 0;
+       obj_desc->mutex.thread_id = NULL;
        return_ACPI_STATUS(status);
 }
 
@@ -415,9 +403,6 @@ acpi_ex_release_mutex(union acpi_operand_object *obj_desc,
        }
 
        status = acpi_ex_release_mutex_object(obj_desc);
-       if (ACPI_FAILURE(status)) {
-               return_ACPI_STATUS(status);
-       }
 
        if (obj_desc->mutex.acquisition_depth == 0) {
 
@@ -426,7 +411,6 @@ acpi_ex_release_mutex(union acpi_operand_object *obj_desc,
                walk_state->thread->current_sync_level =
                    obj_desc->mutex.original_sync_level;
        }
-
        return_ACPI_STATUS(status);
 }
 
@@ -479,7 +463,7 @@ void acpi_ex_release_all_mutexes(struct acpi_thread_state *thread)
                /* Mark mutex unowned */
 
                obj_desc->mutex.owner_thread = NULL;
-               obj_desc->mutex.thread_id = 0;
+               obj_desc->mutex.thread_id = NULL;
 
                /* Update Thread sync_level (Last mutex is the important one) */