diff options
Diffstat (limited to 'drivers/acpi/acpica/exresop.c')
-rw-r--r-- | drivers/acpi/acpica/exresop.c | 43 |
1 files changed, 24 insertions, 19 deletions
diff --git a/drivers/acpi/acpica/exresop.c b/drivers/acpi/acpica/exresop.c index 424442d50b5e..861453e58555 100644 --- a/drivers/acpi/acpica/exresop.c +++ b/drivers/acpi/acpica/exresop.c | |||
@@ -90,8 +90,8 @@ acpi_ex_check_object_type(acpi_object_type type_needed, | |||
90 | * specification, a store to a constant is a noop.) | 90 | * specification, a store to a constant is a noop.) |
91 | */ | 91 | */ |
92 | if ((this_type == ACPI_TYPE_INTEGER) && | 92 | if ((this_type == ACPI_TYPE_INTEGER) && |
93 | (((union acpi_operand_object *)object)->common. | 93 | (((union acpi_operand_object *)object)->common.flags & |
94 | flags & AOPOBJ_AML_CONSTANT)) { | 94 | AOPOBJ_AML_CONSTANT)) { |
95 | return (AE_OK); | 95 | return (AE_OK); |
96 | } | 96 | } |
97 | } | 97 | } |
@@ -196,10 +196,10 @@ acpi_ex_resolve_operands(u16 opcode, | |||
196 | * thus, the attached object is always the aliased namespace node | 196 | * thus, the attached object is always the aliased namespace node |
197 | */ | 197 | */ |
198 | if (object_type == ACPI_TYPE_LOCAL_ALIAS) { | 198 | if (object_type == ACPI_TYPE_LOCAL_ALIAS) { |
199 | obj_desc = | 199 | obj_desc = acpi_ns_get_attached_object((struct |
200 | acpi_ns_get_attached_object((struct | 200 | acpi_namespace_node |
201 | acpi_namespace_node | 201 | *) |
202 | *)obj_desc); | 202 | obj_desc); |
203 | *stack_ptr = obj_desc; | 203 | *stack_ptr = obj_desc; |
204 | object_type = | 204 | object_type = |
205 | ((struct acpi_namespace_node *)obj_desc)-> | 205 | ((struct acpi_namespace_node *)obj_desc)-> |
@@ -285,8 +285,8 @@ acpi_ex_resolve_operands(u16 opcode, | |||
285 | case ARGI_REF_OR_STRING: /* Can be a String or Reference */ | 285 | case ARGI_REF_OR_STRING: /* Can be a String or Reference */ |
286 | 286 | ||
287 | if ((ACPI_GET_DESCRIPTOR_TYPE(obj_desc) == | 287 | if ((ACPI_GET_DESCRIPTOR_TYPE(obj_desc) == |
288 | ACPI_DESC_TYPE_OPERAND) | 288 | ACPI_DESC_TYPE_OPERAND) && |
289 | && (obj_desc->common.type == ACPI_TYPE_STRING)) { | 289 | (obj_desc->common.type == ACPI_TYPE_STRING)) { |
290 | /* | 290 | /* |
291 | * String found - the string references a named object and | 291 | * String found - the string references a named object and |
292 | * must be resolved to a node | 292 | * must be resolved to a node |
@@ -465,8 +465,9 @@ acpi_ex_resolve_operands(u16 opcode, | |||
465 | * But we can implicitly convert from a BUFFER or INTEGER | 465 | * But we can implicitly convert from a BUFFER or INTEGER |
466 | * aka - "Implicit Source Operand Conversion" | 466 | * aka - "Implicit Source Operand Conversion" |
467 | */ | 467 | */ |
468 | status = acpi_ex_convert_to_string(obj_desc, stack_ptr, | 468 | status = |
469 | ACPI_IMPLICIT_CONVERT_HEX); | 469 | acpi_ex_convert_to_string(obj_desc, stack_ptr, |
470 | ACPI_IMPLICIT_CONVERT_HEX); | ||
470 | if (ACPI_FAILURE(status)) { | 471 | if (ACPI_FAILURE(status)) { |
471 | if (status == AE_TYPE) { | 472 | if (status == AE_TYPE) { |
472 | ACPI_ERROR((AE_INFO, | 473 | ACPI_ERROR((AE_INFO, |
@@ -597,8 +598,10 @@ acpi_ex_resolve_operands(u16 opcode, | |||
597 | 598 | ||
598 | case ARGI_REGION_OR_BUFFER: /* Used by Load() only */ | 599 | case ARGI_REGION_OR_BUFFER: /* Used by Load() only */ |
599 | 600 | ||
600 | /* Need an operand of type REGION or a BUFFER (which could be a resolved region field) */ | 601 | /* |
601 | 602 | * Need an operand of type REGION or a BUFFER | |
603 | * (which could be a resolved region field) | ||
604 | */ | ||
602 | switch (obj_desc->common.type) { | 605 | switch (obj_desc->common.type) { |
603 | case ACPI_TYPE_BUFFER: | 606 | case ACPI_TYPE_BUFFER: |
604 | case ACPI_TYPE_REGION: | 607 | case ACPI_TYPE_REGION: |
@@ -640,9 +643,9 @@ acpi_ex_resolve_operands(u16 opcode, | |||
640 | 643 | ||
641 | if (acpi_gbl_enable_interpreter_slack) { | 644 | if (acpi_gbl_enable_interpreter_slack) { |
642 | /* | 645 | /* |
643 | * Enable original behavior of Store(), allowing any and all | 646 | * Enable original behavior of Store(), allowing any |
644 | * objects as the source operand. The ACPI spec does not | 647 | * and all objects as the source operand. The ACPI |
645 | * allow this, however. | 648 | * spec does not allow this, however. |
646 | */ | 649 | */ |
647 | break; | 650 | break; |
648 | } | 651 | } |
@@ -655,7 +658,8 @@ acpi_ex_resolve_operands(u16 opcode, | |||
655 | } | 658 | } |
656 | 659 | ||
657 | ACPI_ERROR((AE_INFO, | 660 | ACPI_ERROR((AE_INFO, |
658 | "Needed Integer/Buffer/String/Package/Ref/Ddb], found [%s] %p", | 661 | "Needed Integer/Buffer/String/Package/Ref/Ddb]" |
662 | ", found [%s] %p", | ||
659 | acpi_ut_get_object_type_name | 663 | acpi_ut_get_object_type_name |
660 | (obj_desc), obj_desc)); | 664 | (obj_desc), obj_desc)); |
661 | 665 | ||
@@ -678,9 +682,10 @@ acpi_ex_resolve_operands(u16 opcode, | |||
678 | * Make sure that the original object was resolved to the | 682 | * Make sure that the original object was resolved to the |
679 | * required object type (Simple cases only). | 683 | * required object type (Simple cases only). |
680 | */ | 684 | */ |
681 | status = acpi_ex_check_object_type(type_needed, | 685 | status = |
682 | (*stack_ptr)->common.type, | 686 | acpi_ex_check_object_type(type_needed, |
683 | *stack_ptr); | 687 | (*stack_ptr)->common.type, |
688 | *stack_ptr); | ||
684 | if (ACPI_FAILURE(status)) { | 689 | if (ACPI_FAILURE(status)) { |
685 | return_ACPI_STATUS(status); | 690 | return_ACPI_STATUS(status); |
686 | } | 691 | } |