summaryrefslogtreecommitdiffstats
path: root/drivers/acpi/acpica/nseval.c
diff options
context:
space:
mode:
authorBob Moore <robert.moore@intel.com>2013-04-12 02:24:22 +0200
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-04-12 13:29:46 +0200
commitc34c82bc9634a099a2652889806c5997f2a3d56f (patch)
treef2b9505b179e7e1a069105037fb0a531aeebdb56 /drivers/acpi/acpica/nseval.c
parentACPI: Set length even for TYPE_END_TAG acpi resource (diff)
downloadlinux-c34c82bc9634a099a2652889806c5997f2a3d56f.tar.xz
linux-c34c82bc9634a099a2652889806c5997f2a3d56f.zip
ACPICA: Predefine names: Add allowed argument types to master info table
This change adds the infrastructure to enable typechecking on incoming arguments for the predefined methods/objects. It does not actually contain the code that will fully utilize this information. Also condenses some duplicate code for the predefined names into a new module, utilities/utpredef.c Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi/acpica/nseval.c')
-rw-r--r--drivers/acpi/acpica/nseval.c26
1 files changed, 15 insertions, 11 deletions
diff --git a/drivers/acpi/acpica/nseval.c b/drivers/acpi/acpica/nseval.c
index 1538f3eb2a8f..b61db69d5675 100644
--- a/drivers/acpi/acpica/nseval.c
+++ b/drivers/acpi/acpica/nseval.c
@@ -98,17 +98,21 @@ acpi_status acpi_ns_evaluate(struct acpi_evaluate_info * info)
info->return_object = NULL;
info->param_count = 0;
- /*
- * Get the actual namespace node for the target object. Handles these cases:
- *
- * 1) Null node, Pathname (absolute path)
- * 2) Node, Pathname (path relative to Node)
- * 3) Node, Null Pathname
- */
- status = acpi_ns_get_node(info->prefix_node, info->pathname,
- ACPI_NS_NO_UPSEARCH, &info->resolved_node);
- if (ACPI_FAILURE(status)) {
- return_ACPI_STATUS(status);
+ if (!info->resolved_node) {
+ /*
+ * Get the actual namespace node for the target object if we need to.
+ * Handles these cases:
+ *
+ * 1) Null node, Pathname (absolute path)
+ * 2) Node, Pathname (path relative to Node)
+ * 3) Node, Null Pathname
+ */
+ status = acpi_ns_get_node(info->prefix_node, info->pathname,
+ ACPI_NS_NO_UPSEARCH,
+ &info->resolved_node);
+ if (ACPI_FAILURE(status)) {
+ return_ACPI_STATUS(status);
+ }
}
/*