aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/acpica/nseval.c
diff options
context:
space:
mode:
authorLin Ming <ming.m.lin@intel.com>2009-12-11 15:28:27 +0800
committerLen Brown <len.brown@intel.com>2009-12-15 17:29:37 -0500
commite31c32cfe52e98344dad28853c3331879f72c4b0 (patch)
tree6eb3fe63ef91c8125757f52ddfe0e9a82d22cff0 /drivers/acpi/acpica/nseval.c
parentACPICA: Conditionally perform complex per-predefined-name repairs (diff)
downloadlinux-dev-e31c32cfe52e98344dad28853c3331879f72c4b0.tar.xz
linux-dev-e31c32cfe52e98344dad28853c3331879f72c4b0.zip
ACPICA: Module-level code: enable _REG execution in same scope
This change enables the execution of _REG methods that appear in the same scope as the module-level code, in resonse to an operation region declaration within the module-level code. Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/acpica/nseval.c')
-rw-r--r--drivers/acpi/acpica/nseval.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/acpi/acpica/nseval.c b/drivers/acpi/acpica/nseval.c
index 65e0d1a260ea..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,
method_obj->method.next_object);
type = acpi_ns_get_type(parent_node);
+ /*
+ * Get the region handler and save it in the method object. We may need
+ * this if an operation region declaration causes a _REG method to be run.
+ *
+ * We can't do this in acpi_ps_link_module_code because
+ * acpi_gbl_root_node->Object is NULL at PASS1.
+ */
+ if ((type == ACPI_TYPE_DEVICE) && parent_node->object) {
+ method_obj->method.extra.handler =
+ parent_node->object->device.handler;
+ }
+
/* Must clear next_object (acpi_ns_attach_object needs the field) */
method_obj->method.next_object = NULL;