2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2025-01-05 04:04:01 +08:00

ACPICA: Fix for namespace lookup problem

Fixed a problem where objects of certain types (Device,
ThermalZone, Processor, PowerResource) can be not found if they
are declared and referenced from within the same control method

http://www.acpica.org/bugzilla/show_bug.cgi?id=341.

Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: Len Brown <len.brown@intel.com>
This commit is contained in:
Lin Ming 2008-04-10 19:06:38 +04:00 committed by Len Brown
parent 3e08e2d2d6
commit 14808822a9

View File

@ -230,12 +230,11 @@ acpi_ps_get_next_namepath(struct acpi_walk_state *walk_state,
struct acpi_parse_state *parser_state, struct acpi_parse_state *parser_state,
union acpi_parse_object *arg, u8 possible_method_call) union acpi_parse_object *arg, u8 possible_method_call)
{ {
acpi_status status;
char *path; char *path;
union acpi_parse_object *name_op; union acpi_parse_object *name_op;
acpi_status status;
union acpi_operand_object *method_desc; union acpi_operand_object *method_desc;
struct acpi_namespace_node *node; struct acpi_namespace_node *node;
union acpi_generic_state scope_info;
ACPI_FUNCTION_TRACE(ps_get_next_namepath); ACPI_FUNCTION_TRACE(ps_get_next_namepath);
@ -249,23 +248,16 @@ acpi_ps_get_next_namepath(struct acpi_walk_state *walk_state,
return_ACPI_STATUS(AE_OK); return_ACPI_STATUS(AE_OK);
} }
/* Setup search scope info */
scope_info.scope.node = NULL;
node = parser_state->start_node;
if (node) {
scope_info.scope.node = node;
}
/* /*
* Lookup the name in the internal namespace. We don't want to add * Lookup the name in the internal namespace, starting with the current
* anything new to the namespace here, however, so we use MODE_EXECUTE. * scope. We don't want to add anything new to the namespace here,
* however, so we use MODE_EXECUTE.
* Allow searching of the parent tree, but don't open a new scope - * Allow searching of the parent tree, but don't open a new scope -
* we just want to lookup the object (must be mode EXECUTE to perform * we just want to lookup the object (must be mode EXECUTE to perform
* the upsearch) * the upsearch)
*/ */
status = status = acpi_ns_lookup(walk_state->scope_info, path,
acpi_ns_lookup(&scope_info, path, ACPI_TYPE_ANY, ACPI_IMODE_EXECUTE, ACPI_TYPE_ANY, ACPI_IMODE_EXECUTE,
ACPI_NS_SEARCH_PARENT | ACPI_NS_DONT_OPEN_SCOPE, ACPI_NS_SEARCH_PARENT | ACPI_NS_DONT_OPEN_SCOPE,
NULL, &node); NULL, &node);