]> err.no Git - linux-2.6/blobdiff - drivers/acpi/executer/exutils.c
it8213: fix return value in it8213_init_one()
[linux-2.6] / drivers / acpi / executer / exutils.c
index c40b191f70b5d7c22c91532b9d645adb6b2b3426..86c03880b5233a32a524d7efc5a583c4fb73ea7e 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
@@ -61,7 +61,6 @@
 #include <acpi/acpi.h>
 #include <acpi/acinterp.h>
 #include <acpi/amlcode.h>
-#include <acpi/acevents.h>
 
 #define _COMPONENT          ACPI_EXECUTER
 ACPI_MODULE_NAME("exutils")
@@ -278,7 +277,8 @@ void acpi_ex_acquire_global_lock(u32 field_flags)
  *
  * FUNCTION:    acpi_ex_release_global_lock
  *
- * PARAMETERS:  None
+ * PARAMETERS:  field_flags           - Flags with Lock rule:
+ *                                      always_lock or never_lock
  *
  * RETURN:      None
  *
@@ -286,12 +286,18 @@ void acpi_ex_acquire_global_lock(u32 field_flags)
  *
  ******************************************************************************/
 
-void acpi_ex_release_global_lock(void)
+void acpi_ex_release_global_lock(u32 field_flags)
 {
        acpi_status status;
 
        ACPI_FUNCTION_TRACE(ex_release_global_lock);
 
+       /* Only use the lock if the always_lock bit is set */
+
+       if (!(field_flags & AML_FIELD_LOCK_RULE_MASK)) {
+               return_VOID;
+       }
+
        /* Release the global lock */
 
        status = acpi_ex_release_mutex_object(acpi_gbl_global_lock_mutex);