aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/dispatcher/dswload.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/dispatcher/dswload.c')
-rw-r--r--drivers/acpi/dispatcher/dswload.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/drivers/acpi/dispatcher/dswload.c b/drivers/acpi/dispatcher/dswload.c
index d60d0625b11c..565d4557d0e0 100644
--- a/drivers/acpi/dispatcher/dswload.c
+++ b/drivers/acpi/dispatcher/dswload.c
@@ -547,6 +547,7 @@ acpi_ds_load2_begin_op(struct acpi_walk_state *walk_state,
547 acpi_status status; 547 acpi_status status;
548 acpi_object_type object_type; 548 acpi_object_type object_type;
549 char *buffer_ptr; 549 char *buffer_ptr;
550 u32 flags;
550 551
551 ACPI_FUNCTION_TRACE(ds_load2_begin_op); 552 ACPI_FUNCTION_TRACE(ds_load2_begin_op);
552 553
@@ -752,12 +753,20 @@ acpi_ds_load2_begin_op(struct acpi_walk_state *walk_state,
752 break; 753 break;
753 } 754 }
754 755
755 /* Add new entry into namespace */ 756 flags = ACPI_NS_NO_UPSEARCH;
757 if (walk_state->pass_number == 3) {
758
759 /* Execution mode, node cannot already exist */
760
761 flags |= ACPI_NS_ERROR_IF_FOUND;
762 }
763
764 /* Add new entry or lookup existing entry */
756 765
757 status = 766 status =
758 acpi_ns_lookup(walk_state->scope_info, buffer_ptr, 767 acpi_ns_lookup(walk_state->scope_info, buffer_ptr,
759 object_type, ACPI_IMODE_LOAD_PASS2, 768 object_type, ACPI_IMODE_LOAD_PASS2, flags,
760 ACPI_NS_NO_UPSEARCH, walk_state, &(node)); 769 walk_state, &node);
761 break; 770 break;
762 } 771 }
763 772