diff options
author | Lv Zheng <lv.zheng@intel.com> | 2016-01-14 19:16:57 -0500 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2016-01-15 16:14:12 -0500 |
commit | 66e42ee57cf7fb39601100230ff5bba40513f71b (patch) | |
tree | fd9a18b59b6a8c499a31c68f671b5b5f7e2bb181 | |
parent | e3e9b577b477edbf50e6c1f93beee89f450f2b68 (diff) |
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: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-rw-r--r-- | drivers/acpi/acpica/nseval.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/acpi/acpica/nseval.c b/drivers/acpi/acpica/nseval.c index 15e0b2ec5d65..28dc7e695739 100644 --- a/drivers/acpi/acpica/nseval.c +++ b/drivers/acpi/acpica/nseval.c | |||
@@ -418,7 +418,8 @@ acpi_ns_exec_module_code(union acpi_operand_object *method_obj, | |||
418 | * Get the parent node. We cheat by using the next_object field | 418 | * Get the parent node. We cheat by using the next_object field |
419 | * of the method object descriptor. | 419 | * of the method object descriptor. |
420 | */ | 420 | */ |
421 | parent_node = ACPI_CAST_PTR(struct acpi_namespace_node, | 421 | parent_node = |
422 | ACPI_CAST_PTR(struct acpi_namespace_node, | ||
422 | method_obj->method.next_object); | 423 | method_obj->method.next_object); |
423 | type = acpi_ns_get_type(parent_node); | 424 | type = acpi_ns_get_type(parent_node); |
424 | 425 | ||
@@ -444,9 +445,9 @@ acpi_ns_exec_module_code(union acpi_operand_object *method_obj, | |||
444 | info->prefix_node = parent_node; | 445 | info->prefix_node = parent_node; |
445 | 446 | ||
446 | /* | 447 | /* |
447 | * Get the currently attached parent object. Add a reference, because the | 448 | * Get the currently attached parent object. Add a reference, |
448 | * ref count will be decreased when the method object is installed to | 449 | * because the ref count will be decreased when the method object |
449 | * the parent node. | 450 | * is installed to the parent node. |
450 | */ | 451 | */ |
451 | parent_obj = acpi_ns_get_attached_object(parent_node); | 452 | parent_obj = acpi_ns_get_attached_object(parent_node); |
452 | if (parent_obj) { | 453 | if (parent_obj) { |
@@ -455,8 +456,8 @@ acpi_ns_exec_module_code(union acpi_operand_object *method_obj, | |||
455 | 456 | ||
456 | /* Install the method (module-level code) in the parent node */ | 457 | /* Install the method (module-level code) in the parent node */ |
457 | 458 | ||
458 | status = acpi_ns_attach_object(parent_node, method_obj, | 459 | status = |
459 | ACPI_TYPE_METHOD); | 460 | acpi_ns_attach_object(parent_node, method_obj, ACPI_TYPE_METHOD); |
460 | if (ACPI_FAILURE(status)) { | 461 | if (ACPI_FAILURE(status)) { |
461 | goto exit; | 462 | goto exit; |
462 | } | 463 | } |