aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLin Ming <ming.m.lin@intel.com>2008-04-10 11:06:38 -0400
committerLen Brown <len.brown@intel.com>2008-04-22 14:29:24 -0400
commit14808822a9cea782c2e6f8d39e438cc3891f6472 (patch)
treec03ae3704fe2d4d07088bb8363e4901e42d13cd6 /drivers
parent3e08e2d2d6efb256aa035e300deb059bb333b6db (diff)
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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/acpi/parser/psargs.c24
1 files changed, 8 insertions, 16 deletions
diff --git a/drivers/acpi/parser/psargs.c b/drivers/acpi/parser/psargs.c
index c2b9835c890b..442880f5600e 100644
--- a/drivers/acpi/parser/psargs.c
+++ b/drivers/acpi/parser/psargs.c
@@ -230,12 +230,11 @@ acpi_ps_get_next_namepath(struct acpi_walk_state *walk_state,
230 struct acpi_parse_state *parser_state, 230 struct acpi_parse_state *parser_state,
231 union acpi_parse_object *arg, u8 possible_method_call) 231 union acpi_parse_object *arg, u8 possible_method_call)
232{ 232{
233 acpi_status status;
233 char *path; 234 char *path;
234 union acpi_parse_object *name_op; 235 union acpi_parse_object *name_op;
235 acpi_status status;
236 union acpi_operand_object *method_desc; 236 union acpi_operand_object *method_desc;
237 struct acpi_namespace_node *node; 237 struct acpi_namespace_node *node;
238 union acpi_generic_state scope_info;
239 238
240 ACPI_FUNCTION_TRACE(ps_get_next_namepath); 239 ACPI_FUNCTION_TRACE(ps_get_next_namepath);
241 240
@@ -249,25 +248,18 @@ acpi_ps_get_next_namepath(struct acpi_walk_state *walk_state,
249 return_ACPI_STATUS(AE_OK); 248 return_ACPI_STATUS(AE_OK);
250 } 249 }
251 250
252 /* Setup search scope info */
253
254 scope_info.scope.node = NULL;
255 node = parser_state->start_node;
256 if (node) {
257 scope_info.scope.node = node;
258 }
259
260 /* 251 /*
261 * Lookup the name in the internal namespace. We don't want to add 252 * Lookup the name in the internal namespace, starting with the current
262 * anything new to the namespace here, however, so we use MODE_EXECUTE. 253 * scope. We don't want to add anything new to the namespace here,
254 * however, so we use MODE_EXECUTE.
263 * Allow searching of the parent tree, but don't open a new scope - 255 * Allow searching of the parent tree, but don't open a new scope -
264 * we just want to lookup the object (must be mode EXECUTE to perform 256 * we just want to lookup the object (must be mode EXECUTE to perform
265 * the upsearch) 257 * the upsearch)
266 */ 258 */
267 status = 259 status = acpi_ns_lookup(walk_state->scope_info, path,
268 acpi_ns_lookup(&scope_info, path, ACPI_TYPE_ANY, ACPI_IMODE_EXECUTE, 260 ACPI_TYPE_ANY, ACPI_IMODE_EXECUTE,
269 ACPI_NS_SEARCH_PARENT | ACPI_NS_DONT_OPEN_SCOPE, 261 ACPI_NS_SEARCH_PARENT | ACPI_NS_DONT_OPEN_SCOPE,
270 NULL, &node); 262 NULL, &node);
271 263
272 /* 264 /*
273 * If this name is a control method invocation, we must 265 * If this name is a control method invocation, we must