diff options
Diffstat (limited to 'drivers/acpi/acpica/dswload2.c')
-rw-r--r-- | drivers/acpi/acpica/dswload2.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/acpi/acpica/dswload2.c b/drivers/acpi/acpica/dswload2.c index 8d510c7e20c8..aad83ef5a4ec 100644 --- a/drivers/acpi/acpica/dswload2.c +++ b/drivers/acpi/acpica/dswload2.c @@ -310,6 +310,22 @@ acpi_ds_load2_begin_op(struct acpi_walk_state *walk_state, flags |= ACPI_NS_TEMPORARY; } } +#ifdef ACPI_ASL_COMPILER + + /* + * Do not open a scope for AML_EXTERNAL_OP + * acpi_ns_lookup can open a new scope based on the object type + * of this op. AML_EXTERNAL_OP is a declaration rather than a + * definition. In the case that this external is a method object, + * acpi_ns_lookup will open a new scope. However, an AML_EXTERNAL_OP + * associated with the ACPI_TYPE_METHOD is a declaration, rather than + * a definition. Flags is set to avoid opening a scope for any + * AML_EXTERNAL_OP. + */ + if (walk_state->opcode == AML_EXTERNAL_OP) { + flags |= ACPI_NS_DONT_OPEN_SCOPE; + } +#endif /* Add new entry or lookup existing entry */ |