From 849c25719ac6acc7420515c7b6324f4248a13790 Mon Sep 17 00:00:00 2001 From: Lv Zheng Date: Tue, 29 Dec 2015 14:02:58 +0800 Subject: ACPICA: Events: Split acpi_ev_associate_reg_method() from region initialization code ACPICA commit 87c85610250ff7141a84507f68dbc1e00f2936db This patch introduces a new region initialization function acpi_ev_associate_reg_method(), which is invoked to associate the _REG method to its related region object. Region object's default value assignments are also sorted by cleaning up the code using this new function. Lv Zheng. Link: https://github.com/acpica/acpica/commit/87c85610 Signed-off-by: Lv Zheng Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki --- drivers/acpi/acpica/excreate.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'drivers/acpi/acpica/excreate.c') diff --git a/drivers/acpi/acpica/excreate.c b/drivers/acpi/acpica/excreate.c index 0f3444647f52..6a1396e313b1 100644 --- a/drivers/acpi/acpica/excreate.c +++ b/drivers/acpi/acpica/excreate.c @@ -326,9 +326,10 @@ acpi_ex_create_region(u8 * aml_start, * Remember location in AML stream of address & length * operands since they need to be evaluated at run time. */ - region_obj2 = obj_desc->common.next_object; + region_obj2 = acpi_ns_get_secondary_object(obj_desc); region_obj2->extra.aml_start = aml_start; region_obj2->extra.aml_length = aml_length; + region_obj2->extra.method_REG = NULL; if (walk_state->scope_info) { region_obj2->extra.scope_node = walk_state->scope_info->scope.node; @@ -342,6 +343,9 @@ acpi_ex_create_region(u8 * aml_start, obj_desc->region.address = 0; obj_desc->region.length = 0; obj_desc->region.node = node; + obj_desc->region.handler = NULL; + obj_desc->common.flags &= + ~(AOPOBJ_SETUP_COMPLETE | AOPOBJ_OBJECT_INITIALIZED); /* Install the new region object in the parent Node */ -- cgit v1.2.3