ACPICA: Restructure includes into public/private
[safe/jmp/linux-2.6] / drivers / acpi / dispatcher / dswexec.c
index 8ba4bb3..2482cbd 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
@@ -43,6 +43,7 @@
  */
 
 #include <acpi/acpi.h>
+#include <acpi/accommon.h>
 #include <acpi/acparser.h>
 #include <acpi/amlcode.h>
 #include <acpi/acdispat.h>
@@ -166,6 +167,10 @@ acpi_ds_get_predicate_value(struct acpi_walk_state *walk_state,
                status = AE_CTRL_FALSE;
        }
 
+       /* Predicate can be used for an implicit return value */
+
+       (void)acpi_ds_do_implicit_return(local_obj_desc, walk_state, TRUE);
+
       cleanup:
 
        ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "Completed a predicate eval=%X Op=%p\n",
@@ -408,14 +413,6 @@ acpi_status acpi_ds_exec_end_op(struct acpi_walk_state *walk_state)
                                                            [walk_state->
                                                             num_operands - 1]),
                                                          walk_state);
-                       if (ACPI_SUCCESS(status)) {
-                               ACPI_DUMP_OPERANDS(ACPI_WALK_OPERANDS,
-                                                  ACPI_IMODE_EXECUTE,
-                                                  acpi_ps_get_opcode_name
-                                                  (walk_state->opcode),
-                                                  walk_state->num_operands,
-                                                  "after ExResolveOperands");
-                       }
                }
 
                if (ACPI_SUCCESS(status)) {
@@ -437,10 +434,10 @@ acpi_status acpi_ds_exec_end_op(struct acpi_walk_state *walk_state)
                             ACPI_TYPE_LOCAL_REFERENCE)
                            && (walk_state->operands[1]->common.type ==
                                ACPI_TYPE_LOCAL_REFERENCE)
-                           && (walk_state->operands[0]->reference.opcode ==
-                               walk_state->operands[1]->reference.opcode)
-                           && (walk_state->operands[0]->reference.offset ==
-                               walk_state->operands[1]->reference.offset)) {
+                           && (walk_state->operands[0]->reference.class ==
+                               walk_state->operands[1]->reference.class)
+                           && (walk_state->operands[0]->reference.value ==
+                               walk_state->operands[1]->reference.value)) {
                                status = AE_OK;
                        } else {
                                ACPI_EXCEPTION((AE_INFO, status,
@@ -652,6 +649,17 @@ acpi_status acpi_ds_exec_end_op(struct acpi_walk_state *walk_state)
                                if (ACPI_FAILURE(status)) {
                                        break;
                                }
+                       } else if (op->common.aml_opcode == AML_BANK_FIELD_OP) {
+                               ACPI_DEBUG_PRINT((ACPI_DB_EXEC,
+                                                 "Executing BankField Op=%p\n",
+                                                 op));
+
+                               status =
+                                   acpi_ds_eval_bank_field_operands(walk_state,
+                                                                    op);
+                               if (ACPI_FAILURE(status)) {
+                                       break;
+                               }
                        }
                        break;