Commit 66e42ee5 authored by Lv Zheng's avatar Lv Zheng Committed by Rafael J. Wysocki

ACPICA: Reduce regression fix divergence from upstream ACPICA

Linux has been fixed during 20151218 release cycle by reverting wrong code
in the following commit:
  ACPICA commit: 071eff738c59eda1792ac24b3b688b61691d7e7c
  Subject: Add per-table execution of module-level code, early region
           handlers
While upstream ACPICA fixes later in the following commit:
  ACPICA commit: bf6cfddb4784c349f781758981b207253b5a1252
  Subject: Fix for module-level-code regression introduced in 20151218

This results in the divergences and this patch is meant to reduce such
divergences. Lv Zheng.
Signed-off-by: default avatarLv Zheng <lv.zheng@intel.com>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent e3e9b577
...@@ -418,7 +418,8 @@ acpi_ns_exec_module_code(union acpi_operand_object *method_obj, ...@@ -418,7 +418,8 @@ acpi_ns_exec_module_code(union acpi_operand_object *method_obj,
* Get the parent node. We cheat by using the next_object field * Get the parent node. We cheat by using the next_object field
* of the method object descriptor. * of the method object descriptor.
*/ */
parent_node = ACPI_CAST_PTR(struct acpi_namespace_node, parent_node =
ACPI_CAST_PTR(struct acpi_namespace_node,
method_obj->method.next_object); method_obj->method.next_object);
type = acpi_ns_get_type(parent_node); type = acpi_ns_get_type(parent_node);
...@@ -444,9 +445,9 @@ acpi_ns_exec_module_code(union acpi_operand_object *method_obj, ...@@ -444,9 +445,9 @@ acpi_ns_exec_module_code(union acpi_operand_object *method_obj,
info->prefix_node = parent_node; info->prefix_node = parent_node;
/* /*
* Get the currently attached parent object. Add a reference, because the * Get the currently attached parent object. Add a reference,
* ref count will be decreased when the method object is installed to * because the ref count will be decreased when the method object
* the parent node. * is installed to the parent node.
*/ */
parent_obj = acpi_ns_get_attached_object(parent_node); parent_obj = acpi_ns_get_attached_object(parent_node);
if (parent_obj) { if (parent_obj) {
...@@ -455,8 +456,8 @@ acpi_ns_exec_module_code(union acpi_operand_object *method_obj, ...@@ -455,8 +456,8 @@ acpi_ns_exec_module_code(union acpi_operand_object *method_obj,
/* Install the method (module-level code) in the parent node */ /* Install the method (module-level code) in the parent node */
status = acpi_ns_attach_object(parent_node, method_obj, status =
ACPI_TYPE_METHOD); acpi_ns_attach_object(parent_node, method_obj, ACPI_TYPE_METHOD);
if (ACPI_FAILURE(status)) { if (ACPI_FAILURE(status)) {
goto exit; goto exit;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment