diff options
| author | Jung-uk Kim <jkim@FreeBSD.org> | 2020-02-14 19:19:39 +0000 |
|---|---|---|
| committer | Jung-uk Kim <jkim@FreeBSD.org> | 2020-02-14 19:19:39 +0000 |
| commit | aa36cd6999384cddbfa0d030bcdd44e8bf9c7779 (patch) | |
| tree | 4f865c7e1146baad112589d1fc57dc6b335c68ec /source/compiler/aslutils.c | |
| parent | 8bf5cb5c35eaf503e388d960914add6a539c1e06 (diff) | |
Notes
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 4233318f0ea63..42ef2c0b88c15 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 |
