diff options
Diffstat (limited to 'drivers/acpi/acpica/nseval.c')
-rw-r--r-- | drivers/acpi/acpica/nseval.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/drivers/acpi/acpica/nseval.c b/drivers/acpi/acpica/nseval.c index f771e978c403..af9fe9103734 100644 --- a/drivers/acpi/acpica/nseval.c +++ b/drivers/acpi/acpica/nseval.c | |||
@@ -381,6 +381,18 @@ acpi_ns_exec_module_code(union acpi_operand_object *method_obj, | |||
381 | method_obj->method.next_object); | 381 | method_obj->method.next_object); |
382 | type = acpi_ns_get_type(parent_node); | 382 | type = acpi_ns_get_type(parent_node); |
383 | 383 | ||
384 | /* | ||
385 | * Get the region handler and save it in the method object. We may need | ||
386 | * this if an operation region declaration causes a _REG method to be run. | ||
387 | * | ||
388 | * We can't do this in acpi_ps_link_module_code because | ||
389 | * acpi_gbl_root_node->Object is NULL at PASS1. | ||
390 | */ | ||
391 | if ((type == ACPI_TYPE_DEVICE) && parent_node->object) { | ||
392 | method_obj->method.extra.handler = | ||
393 | parent_node->object->device.handler; | ||
394 | } | ||
395 | |||
384 | /* Must clear next_object (acpi_ns_attach_object needs the field) */ | 396 | /* Must clear next_object (acpi_ns_attach_object needs the field) */ |
385 | 397 | ||
386 | method_obj->method.next_object = NULL; | 398 | method_obj->method.next_object = NULL; |
@@ -415,6 +427,12 @@ acpi_ns_exec_module_code(union acpi_operand_object *method_obj, | |||
415 | ACPI_DEBUG_PRINT((ACPI_DB_INIT, "Executed module-level code at %p\n", | 427 | ACPI_DEBUG_PRINT((ACPI_DB_INIT, "Executed module-level code at %p\n", |
416 | method_obj->method.aml_start)); | 428 | method_obj->method.aml_start)); |
417 | 429 | ||
430 | /* Delete a possible implicit return value (in slack mode) */ | ||
431 | |||
432 | if (info->return_object) { | ||
433 | acpi_ut_remove_reference(info->return_object); | ||
434 | } | ||
435 | |||
418 | /* Detach the temporary method object */ | 436 | /* Detach the temporary method object */ |
419 | 437 | ||
420 | acpi_ns_detach_object(parent_node); | 438 | acpi_ns_detach_object(parent_node); |