aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/parser/psparse.c
diff options
context:
space:
mode:
authorLen Brown <len.brown@intel.com>2005-09-03 00:09:12 -0400
committerLen Brown <len.brown@intel.com>2005-09-03 00:10:05 -0400
commita94f18810f52d3a6de0a09bee0c7258b62eca262 (patch)
treea1bee534fe254106cec916642ae90ebf15cec201 /drivers/acpi/parser/psparse.c
parent8813dfbfc56b3f7c369b3115c2f70bcacd77ec51 (diff)
[ACPI] revert owner-id-3.patch
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/parser/psparse.c')
-rw-r--r--drivers/acpi/parser/psparse.c21
1 files changed, 15 insertions, 6 deletions
diff --git a/drivers/acpi/parser/psparse.c b/drivers/acpi/parser/psparse.c
index 36771309c62f..3248051d77ee 100644
--- a/drivers/acpi/parser/psparse.c
+++ b/drivers/acpi/parser/psparse.c
@@ -438,6 +438,7 @@ acpi_ps_next_parse_state(struct acpi_walk_state *walk_state,
438acpi_status acpi_ps_parse_aml(struct acpi_walk_state *walk_state) 438acpi_status acpi_ps_parse_aml(struct acpi_walk_state *walk_state)
439{ 439{
440 acpi_status status; 440 acpi_status status;
441 acpi_status terminate_status;
441 struct acpi_thread_state *thread; 442 struct acpi_thread_state *thread;
442 struct acpi_thread_state *prev_walk_list = acpi_gbl_current_walk_list; 443 struct acpi_thread_state *prev_walk_list = acpi_gbl_current_walk_list;
443 struct acpi_walk_state *previous_walk_state; 444 struct acpi_walk_state *previous_walk_state;
@@ -507,9 +508,6 @@ acpi_status acpi_ps_parse_aml(struct acpi_walk_state *walk_state)
507 walk_state->method_node, NULL, 508 walk_state->method_node, NULL,
508 status); 509 status);
509 510
510 /* Make sure that failed method will be cleaned as if it was executed */
511 walk_state->parse_flags |= ACPI_PARSE_EXECUTE;
512
513 /* Check for possible multi-thread reentrancy problem */ 511 /* Check for possible multi-thread reentrancy problem */
514 512
515 if ((status == AE_ALREADY_EXISTS) && 513 if ((status == AE_ALREADY_EXISTS) &&
@@ -526,6 +524,14 @@ acpi_status acpi_ps_parse_aml(struct acpi_walk_state *walk_state)
526 } 524 }
527 } 525 }
528 526
527 if (walk_state->method_desc) {
528 /* Decrement the thread count on the method parse tree */
529
530 if (walk_state->method_desc->method.thread_count) {
531 walk_state->method_desc->method.thread_count--;
532 }
533 }
534
529 /* We are done with this walk, move on to the parent if any */ 535 /* We are done with this walk, move on to the parent if any */
530 536
531 walk_state = acpi_ds_pop_walk_state(thread); 537 walk_state = acpi_ds_pop_walk_state(thread);
@@ -540,10 +546,13 @@ acpi_status acpi_ps_parse_aml(struct acpi_walk_state *walk_state)
540 */ 546 */
541 if ((walk_state->parse_flags & ACPI_PARSE_MODE_MASK) == 547 if ((walk_state->parse_flags & ACPI_PARSE_MODE_MASK) ==
542 ACPI_PARSE_EXECUTE) { 548 ACPI_PARSE_EXECUTE) {
543 if (walk_state->method_desc) { 549 terminate_status =
544 walk_state->method_desc->method.thread_count--; 550 acpi_ds_terminate_control_method(walk_state);
551 if (ACPI_FAILURE(terminate_status)) {
552 ACPI_REPORT_ERROR(("Could not terminate control method properly\n"));
553
554 /* Ignore error and continue */
545 } 555 }
546 acpi_ds_terminate_control_method (walk_state);
547 } 556 }
548 557
549 /* Delete this walk state and all linked control states */ 558 /* Delete this walk state and all linked control states */