aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/dispatcher/dsutils.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/dispatcher/dsutils.c')
-rw-r--r--drivers/acpi/dispatcher/dsutils.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/acpi/dispatcher/dsutils.c b/drivers/acpi/dispatcher/dsutils.c
index 53356a591ac1..3fbe17ebef5a 100644
--- a/drivers/acpi/dispatcher/dsutils.c
+++ b/drivers/acpi/dispatcher/dsutils.c
@@ -202,6 +202,7 @@ acpi_ds_is_result_used(union acpi_parse_object * op,
202 */ 202 */
203 if ((!op->common.parent) || 203 if ((!op->common.parent) ||
204 (op->common.parent->common.aml_opcode == AML_SCOPE_OP)) { 204 (op->common.parent->common.aml_opcode == AML_SCOPE_OP)) {
205
205 /* No parent, the return value cannot possibly be used */ 206 /* No parent, the return value cannot possibly be used */
206 207
207 ACPI_DEBUG_PRINT((ACPI_DB_DISPATCH, 208 ACPI_DEBUG_PRINT((ACPI_DB_DISPATCH,
@@ -352,6 +353,7 @@ acpi_ds_delete_result_if_not_used(union acpi_parse_object *op,
352 } 353 }
353 354
354 if (!acpi_ds_is_result_used(op, walk_state)) { 355 if (!acpi_ds_is_result_used(op, walk_state)) {
356
355 /* Must pop the result stack (obj_desc should be equal to result_obj) */ 357 /* Must pop the result stack (obj_desc should be equal to result_obj) */
356 358
357 status = acpi_ds_result_pop(&obj_desc, walk_state); 359 status = acpi_ds_result_pop(&obj_desc, walk_state);
@@ -498,7 +500,9 @@ acpi_ds_create_operand(struct acpi_walk_state *walk_state,
498 */ 500 */
499 if ((walk_state->deferred_node) && 501 if ((walk_state->deferred_node) &&
500 (walk_state->deferred_node->type == ACPI_TYPE_BUFFER_FIELD) 502 (walk_state->deferred_node->type == ACPI_TYPE_BUFFER_FIELD)
501 && (arg_index != 0)) { 503 && (arg_index ==
504 (u32) ((walk_state->opcode ==
505 AML_CREATE_FIELD_OP) ? 3 : 2))) {
502 obj_desc = 506 obj_desc =
503 ACPI_CAST_PTR(union acpi_operand_object, 507 ACPI_CAST_PTR(union acpi_operand_object,
504 walk_state->deferred_node); 508 walk_state->deferred_node);
@@ -521,6 +525,7 @@ acpi_ds_create_operand(struct acpi_walk_state *walk_state,
521 && (parent_op->common.aml_opcode != AML_REGION_OP) 525 && (parent_op->common.aml_opcode != AML_REGION_OP)
522 && (parent_op->common.aml_opcode != 526 && (parent_op->common.aml_opcode !=
523 AML_INT_NAMEPATH_OP)) { 527 AML_INT_NAMEPATH_OP)) {
528
524 /* Enter name into namespace if not found */ 529 /* Enter name into namespace if not found */
525 530
526 interpreter_mode = ACPI_IMODE_LOAD_PASS2; 531 interpreter_mode = ACPI_IMODE_LOAD_PASS2;