aboutsummaryrefslogtreecommitdiff
path: root/sys/contrib/dev/acpica/compiler/aslutils.c
diff options
context:
space:
mode:
authorJung-uk Kim <jkim@FreeBSD.org>2020-02-15 03:47:25 +0000
committerJung-uk Kim <jkim@FreeBSD.org>2020-02-15 03:47:25 +0000
commitec0234b4c2dd7227caa91f240f251d90aec835b0 (patch)
tree0be3f9b63a04ea1c6a0eaf69da5dea6aca7f8c39 /sys/contrib/dev/acpica/compiler/aslutils.c
parenteb40664d833884856cc80cf0368717b659699dbf (diff)
parentaa36cd6999384cddbfa0d030bcdd44e8bf9c7779 (diff)
downloadsrc-ec0234b4c2dd7227caa91f240f251d90aec835b0.tar.gz
src-ec0234b4c2dd7227caa91f240f251d90aec835b0.zip
MFV: r357927
Merge ACPICA 20200214.
Notes
Notes: svn path=/head/; revision=357959
Diffstat (limited to 'sys/contrib/dev/acpica/compiler/aslutils.c')
-rw-r--r--sys/contrib/dev/acpica/compiler/aslutils.c41
1 files changed, 38 insertions, 3 deletions
diff --git a/sys/contrib/dev/acpica/compiler/aslutils.c b/sys/contrib/dev/acpica/compiler/aslutils.c
index 36a7afeb4dfe..c7d9f6e98db7 100644
--- a/sys/contrib/dev/acpica/compiler/aslutils.c
+++ b/sys/contrib/dev/acpica/compiler/aslutils.c
@@ -298,7 +298,7 @@ UtNodeIsDescendantOf (
/*******************************************************************************
*
- * FUNCTION: UtGetParentMethod
+ * FUNCTION: UtGetParentMethodNode
*
* PARAMETERS: Node - Namespace node for any object
*
@@ -309,8 +309,8 @@ UtNodeIsDescendantOf (
*
******************************************************************************/
-void *
-UtGetParentMethod (
+ACPI_NAMESPACE_NODE *
+UtGetParentMethodNode (
ACPI_NAMESPACE_NODE *Node)
{
ACPI_NAMESPACE_NODE *ParentNode;
@@ -340,6 +340,41 @@ UtGetParentMethod (
/*******************************************************************************
*
+ * FUNCTION: UtGetParentMethodOp
+ *
+ * PARAMETERS: Op - Parse Op to be checked
+ *
+ * RETURN: Control method Op if found. NULL otherwise
+ *
+ * DESCRIPTION: Find the control method parent of a parse op. Returns NULL if
+ * the input Op is not within a control method.
+ *
+ ******************************************************************************/
+
+ACPI_PARSE_OBJECT *
+UtGetParentMethodOp (
+ ACPI_PARSE_OBJECT *Op)
+{
+ ACPI_PARSE_OBJECT *NextOp;
+
+
+ NextOp = Op->Asl.Parent;
+ while (NextOp)
+ {
+ if (NextOp->Asl.AmlOpcode == AML_METHOD_OP)
+ {
+ return (NextOp);
+ }
+
+ NextOp = NextOp->Asl.Parent;
+ }
+
+ return (NULL); /* No parent method found */
+}
+
+
+/*******************************************************************************
+ *
* FUNCTION: UtDisplaySupportedTables
*
* PARAMETERS: None