summaryrefslogtreecommitdiff
path: root/drivers/acpi/acpica/nsnames.c
diff options
context:
space:
mode:
authorBob Moore <robert.moore@intel.com>2017-08-03 14:27:22 +0800
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2017-08-03 23:34:17 +0200
commita62a7117d91ca83d319566cbe16039f4e9f413c2 (patch)
tree23be92692a4e0191972530325761627ca526bb73 /drivers/acpi/acpica/nsnames.c
parent7ab58197d84c29cf20162eaaed1eb2cc94fc73a7 (diff)
downloadlwn-a62a7117d91ca83d319566cbe16039f4e9f413c2.tar.gz
lwn-a62a7117d91ca83d319566cbe16039f4e9f413c2.zip
ACPICA: Implement deferred resolution of reference package elements
ACPICA commit 0c08790c56fdf0dc081ae869495a09d8c4230854 This change defers the resolution of package elements that are named references until after the entire namespace has been loaded from the definition block. This allows such references to be in fact forward references for both module level code and control methods. Link: https://github.com/acpica/acpica/commit/0c08790c 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/nsnames.c')
-rw-r--r--drivers/acpi/acpica/nsnames.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/acpi/acpica/nsnames.c b/drivers/acpi/acpica/nsnames.c
index aa16aeaa8937..a410760a0308 100644
--- a/drivers/acpi/acpica/nsnames.c
+++ b/drivers/acpi/acpica/nsnames.c
@@ -89,7 +89,14 @@ acpi_size acpi_ns_get_pathname_length(struct acpi_namespace_node *node)
{
acpi_size size;
- ACPI_FUNCTION_ENTRY();
+ /* Validate the Node */
+
+ if (ACPI_GET_DESCRIPTOR_TYPE(node) != ACPI_DESC_TYPE_NAMED) {
+ ACPI_ERROR((AE_INFO,
+ "Invalid/cached reference target node: %p, descriptor type %d",
+ node, ACPI_GET_DESCRIPTOR_TYPE(node)));
+ return (0);
+ }
size = acpi_ns_build_normalized_path(node, NULL, 0, FALSE);
return (size);