Merge master.kernel.org:/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog
[pandora-kernel.git] / drivers / acpi / dispatcher / dswexec.c
index 3acbd91..69693fa 100644 (file)
@@ -6,7 +6,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -219,7 +219,7 @@ acpi_ds_exec_begin_op(struct acpi_walk_state *walk_state,
        if (!op) {
                status = acpi_ds_load2_begin_op(walk_state, out_op);
                if (ACPI_FAILURE(status)) {
-                       return_ACPI_STATUS(status);
+                       goto error_exit;
                }
 
                op = *out_op;
@@ -238,7 +238,7 @@ acpi_ds_exec_begin_op(struct acpi_walk_state *walk_state,
 
                        status = acpi_ds_scope_stack_pop(walk_state);
                        if (ACPI_FAILURE(status)) {
-                               return_ACPI_STATUS(status);
+                               goto error_exit;
                        }
                }
        }
@@ -287,7 +287,7 @@ acpi_ds_exec_begin_op(struct acpi_walk_state *walk_state,
 
                status = acpi_ds_result_stack_push(walk_state);
                if (ACPI_FAILURE(status)) {
-                       return_ACPI_STATUS(status);
+                       goto error_exit;
                }
 
                status = acpi_ds_exec_begin_control_op(walk_state, op);
@@ -313,10 +313,10 @@ acpi_ds_exec_begin_op(struct acpi_walk_state *walk_state,
        case AML_CLASS_EXECUTE:
        case AML_CLASS_CREATE:
                /*
-                * Most operators with arguments.
+                * Most operators with arguments (except create_xxx_field operators)
                 * Start a new result/operand state
                 */
-               if (walk_state->opcode != AML_CREATE_FIELD_OP) {
+               if (walk_state->op_info->object_type != ACPI_TYPE_BUFFER_FIELD) {
                        status = acpi_ds_result_stack_push(walk_state);
                }
                break;
@@ -328,6 +328,10 @@ acpi_ds_exec_begin_op(struct acpi_walk_state *walk_state,
        /* Nothing to do here during method execution */
 
        return_ACPI_STATUS(status);
+
+      error_exit:
+       status = acpi_ds_method_error(status, walk_state);
+       return_ACPI_STATUS(status);
 }
 
 /*****************************************************************************
@@ -472,7 +476,6 @@ acpi_status acpi_ds_exec_end_op(struct acpi_walk_state *walk_state)
                            acpi_ds_result_push(walk_state->result_obj,
                                                walk_state);
                }
-
                break;
 
        default:
@@ -510,6 +513,7 @@ acpi_status acpi_ds_exec_end_op(struct acpi_walk_state *walk_state)
                                ACPI_DEBUG_PRINT((ACPI_DB_DISPATCH,
                                                  "Method Reference in a Package, Op=%p\n",
                                                  op));
+
                                op->common.node =
                                    (struct acpi_namespace_node *)op->asl.value.
                                    arg->asl.node->object;
@@ -670,7 +674,6 @@ acpi_status acpi_ds_exec_end_op(struct acpi_walk_state *walk_state)
 
                                status = acpi_ds_result_stack_pop(walk_state);
                        }
-
                        break;
 
                case AML_TYPE_UNDEFINED:
@@ -708,7 +711,6 @@ acpi_status acpi_ds_exec_end_op(struct acpi_walk_state *walk_state)
         * Check if we just completed the evaluation of a
         * conditional predicate
         */
-
        if ((ACPI_SUCCESS(status)) &&
            (walk_state->control_state) &&
            (walk_state->control_state->common.state ==