aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/acpi/acpica/dswload.c50
1 files changed, 33 insertions, 17 deletions
diff --git a/drivers/acpi/acpica/dswload.c b/drivers/acpi/acpica/dswload.c
index 6de3a99d4cd4..10fc78517843 100644
--- a/drivers/acpi/acpica/dswload.c
+++ b/drivers/acpi/acpica/dswload.c
@@ -639,26 +639,42 @@ acpi_ds_load2_begin_op(struct acpi_walk_state *walk_state,
639 break; 639 break;
640 640
641 case AML_SCOPE_OP: 641 case AML_SCOPE_OP:
642 /* 642
643 * The Path is an object reference to an existing object. 643 /* Special case for Scope(\) -> refers to the Root node */
644 * Don't enter the name into the namespace, but look it up 644
645 * for use later. 645 if (op && (op->named.node == acpi_gbl_root_node)) {
646 */ 646 node = op->named.node;
647 status = 647
648 acpi_ns_lookup(walk_state->scope_info, buffer_ptr, 648 status =
649 object_type, ACPI_IMODE_EXECUTE, 649 acpi_ds_scope_stack_push(node, object_type,
650 ACPI_NS_SEARCH_PARENT, walk_state, &(node)); 650 walk_state);
651 if (ACPI_FAILURE(status)) { 651 if (ACPI_FAILURE(status)) {
652#ifdef ACPI_ASL_COMPILER 652 return_ACPI_STATUS(status);
653 if (status == AE_NOT_FOUND) {
654 status = AE_OK;
655 } else {
656 ACPI_ERROR_NAMESPACE(buffer_ptr, status);
657 } 653 }
654 } else {
655 /*
656 * The Path is an object reference to an existing object.
657 * Don't enter the name into the namespace, but look it up
658 * for use later.
659 */
660 status =
661 acpi_ns_lookup(walk_state->scope_info, buffer_ptr,
662 object_type, ACPI_IMODE_EXECUTE,
663 ACPI_NS_SEARCH_PARENT, walk_state,
664 &(node));
665 if (ACPI_FAILURE(status)) {
666#ifdef ACPI_ASL_COMPILER
667 if (status == AE_NOT_FOUND) {
668 status = AE_OK;
669 } else {
670 ACPI_ERROR_NAMESPACE(buffer_ptr,
671 status);
672 }
658#else 673#else
659 ACPI_ERROR_NAMESPACE(buffer_ptr, status); 674 ACPI_ERROR_NAMESPACE(buffer_ptr, status);
660#endif 675#endif
661 return_ACPI_STATUS(status); 676 return_ACPI_STATUS(status);
677 }
662 } 678 }
663 679
664 /* 680 /*