diff options
Diffstat (limited to 'drivers/acpi/dispatcher')
-rw-r--r-- | drivers/acpi/dispatcher/dsmethod.c | 20 | ||||
-rw-r--r-- | drivers/acpi/dispatcher/dswexec.c | 2 | ||||
-rw-r--r-- | drivers/acpi/dispatcher/dswstate.c | 5 |
3 files changed, 21 insertions, 6 deletions
diff --git a/drivers/acpi/dispatcher/dsmethod.c b/drivers/acpi/dispatcher/dsmethod.c index e348db0e541e..21f059986273 100644 --- a/drivers/acpi/dispatcher/dsmethod.c +++ b/drivers/acpi/dispatcher/dsmethod.c | |||
@@ -231,7 +231,7 @@ acpi_ds_call_control_method(struct acpi_thread_state *thread, | |||
231 | struct acpi_namespace_node *method_node; | 231 | struct acpi_namespace_node *method_node; |
232 | struct acpi_walk_state *next_walk_state = NULL; | 232 | struct acpi_walk_state *next_walk_state = NULL; |
233 | union acpi_operand_object *obj_desc; | 233 | union acpi_operand_object *obj_desc; |
234 | struct acpi_parameter_info info; | 234 | struct acpi_evaluate_info *info; |
235 | u32 i; | 235 | u32 i; |
236 | 236 | ||
237 | ACPI_FUNCTION_TRACE_PTR(ds_call_control_method, this_walk_state); | 237 | ACPI_FUNCTION_TRACE_PTR(ds_call_control_method, this_walk_state); |
@@ -319,12 +319,24 @@ acpi_ds_call_control_method(struct acpi_thread_state *thread, | |||
319 | */ | 319 | */ |
320 | this_walk_state->operands[this_walk_state->num_operands] = NULL; | 320 | this_walk_state->operands[this_walk_state->num_operands] = NULL; |
321 | 321 | ||
322 | info.parameters = &this_walk_state->operands[0]; | 322 | /* |
323 | info.parameter_type = ACPI_PARAM_ARGS; | 323 | * Allocate and initialize the evaluation information block |
324 | * TBD: this is somewhat inefficient, should change interface to | ||
325 | * ds_init_aml_walk. For now, keeps this struct off the CPU stack | ||
326 | */ | ||
327 | info = ACPI_ALLOCATE_ZEROED(sizeof(struct acpi_evaluate_info)); | ||
328 | if (!info) { | ||
329 | return_ACPI_STATUS(AE_NO_MEMORY); | ||
330 | } | ||
331 | |||
332 | info->parameters = &this_walk_state->operands[0]; | ||
333 | info->parameter_type = ACPI_PARAM_ARGS; | ||
324 | 334 | ||
325 | status = acpi_ds_init_aml_walk(next_walk_state, NULL, method_node, | 335 | status = acpi_ds_init_aml_walk(next_walk_state, NULL, method_node, |
326 | obj_desc->method.aml_start, | 336 | obj_desc->method.aml_start, |
327 | obj_desc->method.aml_length, &info, 3); | 337 | obj_desc->method.aml_length, info, 3); |
338 | |||
339 | ACPI_FREE(info); | ||
328 | if (ACPI_FAILURE(status)) { | 340 | if (ACPI_FAILURE(status)) { |
329 | goto cleanup; | 341 | goto cleanup; |
330 | } | 342 | } |
diff --git a/drivers/acpi/dispatcher/dswexec.c b/drivers/acpi/dispatcher/dswexec.c index 8afb20384e96..3acbd9145d72 100644 --- a/drivers/acpi/dispatcher/dswexec.c +++ b/drivers/acpi/dispatcher/dswexec.c | |||
@@ -295,7 +295,7 @@ acpi_ds_exec_begin_op(struct acpi_walk_state *walk_state, | |||
295 | 295 | ||
296 | case AML_CLASS_NAMED_OBJECT: | 296 | case AML_CLASS_NAMED_OBJECT: |
297 | 297 | ||
298 | if (walk_state->walk_type == ACPI_WALK_METHOD) { | 298 | if (walk_state->walk_type & ACPI_WALK_METHOD) { |
299 | /* | 299 | /* |
300 | * Found a named object declaration during method execution; | 300 | * Found a named object declaration during method execution; |
301 | * we must enter this object into the namespace. The created | 301 | * we must enter this object into the namespace. The created |
diff --git a/drivers/acpi/dispatcher/dswstate.c b/drivers/acpi/dispatcher/dswstate.c index 82c1e219bf15..7817e5522679 100644 --- a/drivers/acpi/dispatcher/dswstate.c +++ b/drivers/acpi/dispatcher/dswstate.c | |||
@@ -703,7 +703,7 @@ acpi_ds_init_aml_walk(struct acpi_walk_state *walk_state, | |||
703 | struct acpi_namespace_node *method_node, | 703 | struct acpi_namespace_node *method_node, |
704 | u8 * aml_start, | 704 | u8 * aml_start, |
705 | u32 aml_length, | 705 | u32 aml_length, |
706 | struct acpi_parameter_info *info, u8 pass_number) | 706 | struct acpi_evaluate_info *info, u8 pass_number) |
707 | { | 707 | { |
708 | acpi_status status; | 708 | acpi_status status; |
709 | struct acpi_parse_state *parser_state = &walk_state->parser_state; | 709 | struct acpi_parse_state *parser_state = &walk_state->parser_state; |
@@ -825,9 +825,12 @@ void acpi_ds_delete_walk_state(struct acpi_walk_state *walk_state) | |||
825 | return; | 825 | return; |
826 | } | 826 | } |
827 | 827 | ||
828 | /* There should not be any open scopes */ | ||
829 | |||
828 | if (walk_state->parser_state.scope) { | 830 | if (walk_state->parser_state.scope) { |
829 | ACPI_ERROR((AE_INFO, "%p walk still has a scope list", | 831 | ACPI_ERROR((AE_INFO, "%p walk still has a scope list", |
830 | walk_state)); | 832 | walk_state)); |
833 | acpi_ps_cleanup_scope(&walk_state->parser_state); | ||
831 | } | 834 | } |
832 | 835 | ||
833 | /* Always must free any linked control states */ | 836 | /* Always must free any linked control states */ |