diff options
Diffstat (limited to 'source/compiler/aslutils.c')
-rw-r--r-- | source/compiler/aslutils.c | 41 |
1 files changed, 38 insertions, 3 deletions
diff --git a/source/compiler/aslutils.c b/source/compiler/aslutils.c index 4233318f0ea6..42ef2c0b88c1 100644 --- a/source/compiler/aslutils.c +++ b/source/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 |