summaryrefslogtreecommitdiffstats
path: root/drivers/acpi/acpica/evrgnini.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/evrgnini.c
parent465da9eb75665203a826f961de74a817b870850a (diff)
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/evrgnini.c')
-rw-r--r--drivers/acpi/acpica/evrgnini.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/acpi/acpica/evrgnini.c b/drivers/acpi/acpica/evrgnini.c
index cf29c495302..ff168052a33 100644
--- a/drivers/acpi/acpica/evrgnini.c
+++ b/drivers/acpi/acpica/evrgnini.c
@@ -575,6 +575,21 @@ acpi_ev_initialize_region(union acpi_operand_object *region_obj,
handler_obj = obj_desc->thermal_zone.handler;
break;
+ case ACPI_TYPE_METHOD:
+ /*
+ * If we are executing module level code, the original
+ * Node's object was replaced by this Method object and we
+ * saved the handler in the method object.
+ *
+ * See acpi_ns_exec_module_code
+ */
+ if (obj_desc->method.
+ flags & AOPOBJ_MODULE_LEVEL) {
+ handler_obj =
+ obj_desc->method.extra.handler;
+ }
+ break;
+
default:
/* Ignore other objects */
break;