summaryrefslogtreecommitdiff
path: root/drivers/acpi/namespace
diff options
context:
space:
mode:
authorBob Moore <robert.moore@intel.com>2008-09-27 10:29:31 +0800
committerLen Brown <len.brown@intel.com>2008-10-22 23:14:43 -0400
commitb68bacf225e5e9758472e99505d76125ced3ea88 (patch)
tree82d552e04aca32fa590a84bb6fada78adddc19e4 /drivers/acpi/namespace
parent65f4692c5220330e1ea044796c4cfa603e349c84 (diff)
ACPICA: Disallow evaluation of named object types with no value
Return AE_TYPE for objects that have no value and therefore evaluation is undefined: Device, Event, Mutex, Region, Thermal, and Scope. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/namespace')
-rw-r--r--drivers/acpi/namespace/nseval.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/drivers/acpi/namespace/nseval.c b/drivers/acpi/namespace/nseval.c
index d369164e00b0..0a1ae670a847 100644
--- a/drivers/acpi/namespace/nseval.c
+++ b/drivers/acpi/namespace/nseval.c
@@ -195,7 +195,28 @@ acpi_status acpi_ns_evaluate(struct acpi_evaluate_info * info)
} else {
/*
* 2) Object is not a method, return its current value
+ *
+ * Disallow certain object types. For these, "evaluation" is undefined.
*/
+ switch (info->resolved_node->type) {
+ case ACPI_TYPE_DEVICE:
+ case ACPI_TYPE_EVENT:
+ case ACPI_TYPE_MUTEX:
+ case ACPI_TYPE_REGION:
+ case ACPI_TYPE_THERMAL:
+ case ACPI_TYPE_LOCAL_SCOPE:
+
+ ACPI_ERROR((AE_INFO,
+ "[%4.4s] Evaluation of object type [%s] is not supported",
+ info->resolved_node->name.ascii,
+ acpi_ut_get_type_name(info->resolved_node->
+ type)));
+
+ return_ACPI_STATUS(AE_TYPE);
+
+ default:
+ break;
+ }
/*
* Objects require additional resolution steps (e.g., the Node may be