diff options
-rw-r--r-- | drivers/acpi/parser/psargs.c | 24 |
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 |