aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/executer/exutils.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/executer/exutils.c')
-rw-r--r--drivers/acpi/executer/exutils.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/drivers/acpi/executer/exutils.c b/drivers/acpi/executer/exutils.c
index f73a61aeb7ec..982c8b65876f 100644
--- a/drivers/acpi/executer/exutils.c
+++ b/drivers/acpi/executer/exutils.c
@@ -87,9 +87,9 @@ acpi_status acpi_ex_enter_interpreter(void)
87{ 87{
88 acpi_status status; 88 acpi_status status;
89 89
90 ACPI_FUNCTION_TRACE("ex_enter_interpreter"); 90 ACPI_FUNCTION_TRACE(ex_enter_interpreter);
91 91
92 status = acpi_ut_acquire_mutex(ACPI_MTX_EXECUTE); 92 status = acpi_ut_acquire_mutex(ACPI_MTX_INTERPRETER);
93 if (ACPI_FAILURE(status)) { 93 if (ACPI_FAILURE(status)) {
94 ACPI_ERROR((AE_INFO, "Could not acquire interpreter mutex")); 94 ACPI_ERROR((AE_INFO, "Could not acquire interpreter mutex"));
95 } 95 }
@@ -123,9 +123,9 @@ void acpi_ex_exit_interpreter(void)
123{ 123{
124 acpi_status status; 124 acpi_status status;
125 125
126 ACPI_FUNCTION_TRACE("ex_exit_interpreter"); 126 ACPI_FUNCTION_TRACE(ex_exit_interpreter);
127 127
128 status = acpi_ut_release_mutex(ACPI_MTX_EXECUTE); 128 status = acpi_ut_release_mutex(ACPI_MTX_INTERPRETER);
129 if (ACPI_FAILURE(status)) { 129 if (ACPI_FAILURE(status)) {
130 ACPI_ERROR((AE_INFO, "Could not release interpreter mutex")); 130 ACPI_ERROR((AE_INFO, "Could not release interpreter mutex"));
131 } 131 }
@@ -189,11 +189,12 @@ u8 acpi_ex_acquire_global_lock(u32 field_flags)
189 u8 locked = FALSE; 189 u8 locked = FALSE;
190 acpi_status status; 190 acpi_status status;
191 191
192 ACPI_FUNCTION_TRACE("ex_acquire_global_lock"); 192 ACPI_FUNCTION_TRACE(ex_acquire_global_lock);
193 193
194 /* Only attempt lock if the always_lock bit is set */ 194 /* Only attempt lock if the always_lock bit is set */
195 195
196 if (field_flags & AML_FIELD_LOCK_RULE_MASK) { 196 if (field_flags & AML_FIELD_LOCK_RULE_MASK) {
197
197 /* We should attempt to get the lock, wait forever */ 198 /* We should attempt to get the lock, wait forever */
198 199
199 status = acpi_ev_acquire_global_lock(ACPI_WAIT_FOREVER); 200 status = acpi_ev_acquire_global_lock(ACPI_WAIT_FOREVER);
@@ -225,15 +226,17 @@ void acpi_ex_release_global_lock(u8 locked_by_me)
225{ 226{
226 acpi_status status; 227 acpi_status status;
227 228
228 ACPI_FUNCTION_TRACE("ex_release_global_lock"); 229 ACPI_FUNCTION_TRACE(ex_release_global_lock);
229 230
230 /* Only attempt unlock if the caller locked it */ 231 /* Only attempt unlock if the caller locked it */
231 232
232 if (locked_by_me) { 233 if (locked_by_me) {
234
233 /* OK, now release the lock */ 235 /* OK, now release the lock */
234 236
235 status = acpi_ev_release_global_lock(); 237 status = acpi_ev_release_global_lock();
236 if (ACPI_FAILURE(status)) { 238 if (ACPI_FAILURE(status)) {
239
237 /* Report the error, but there isn't much else we can do */ 240 /* Report the error, but there isn't much else we can do */
238 241
239 ACPI_EXCEPTION((AE_INFO, status, 242 ACPI_EXCEPTION((AE_INFO, status,
@@ -263,7 +266,7 @@ static u32 acpi_ex_digits_needed(acpi_integer value, u32 base)
263 u32 num_digits; 266 u32 num_digits;
264 acpi_integer current_value; 267 acpi_integer current_value;
265 268
266 ACPI_FUNCTION_TRACE("ex_digits_needed"); 269 ACPI_FUNCTION_TRACE(ex_digits_needed);
267 270
268 /* acpi_integer is unsigned, so we don't worry about a '-' prefix */ 271 /* acpi_integer is unsigned, so we don't worry about a '-' prefix */
269 272