summaryrefslogtreecommitdiff
path: root/drivers/acpi/executer/exutils.c
diff options
context:
space:
mode:
authorBob Moore <robert.moore@intel.com>2008-04-10 19:06:37 +0400
committerLen Brown <len.brown@intel.com>2008-04-22 14:29:22 -0400
commitf02e9fa1ceee045f7d5c53d475032815752a2510 (patch)
tree52da78bd3ef6442418ad2dae6fa55aab964dc6b4 /drivers/acpi/executer/exutils.c
parenta4df451a1055d97726ab890249bc3f941906fa75 (diff)
downloadlwn-f02e9fa1ceee045f7d5c53d475032815752a2510.tar.gz
lwn-f02e9fa1ceee045f7d5c53d475032815752a2510.zip
ACPICA: Misc fixes for recent global lock code update
Fixes as a result of running full validation test suite. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/executer/exutils.c')
-rw-r--r--drivers/acpi/executer/exutils.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/acpi/executer/exutils.c b/drivers/acpi/executer/exutils.c
index c40b191f70b5..fd543ee547ae 100644
--- a/drivers/acpi/executer/exutils.c
+++ b/drivers/acpi/executer/exutils.c
@@ -278,7 +278,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 +287,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);