diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2020-02-15 15:05:25 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2020-02-15 15:05:25 +0000 |
| commit | dca7f66f438fbc2ce4584a3863de83fdfccd2fd5 (patch) | |
| tree | 2af80b26dca22235492af498f5baec13f3637f4a /sys/contrib/dev/acpica/compiler/aslutils.c | |
| parent | 473b61d31e6050150c4a1516bd374728e00af923 (diff) | |
| parent | 074ad60a4c77a08c3317387c677f01c207dae129 (diff) | |
Notes
Diffstat (limited to 'sys/contrib/dev/acpica/compiler/aslutils.c')
| -rw-r--r-- | sys/contrib/dev/acpica/compiler/aslutils.c | 41 |
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 |
