summaryrefslogtreecommitdiffstats
path: root/source/components/disassembler/dmwalk.c
diff options
context:
space:
mode:
authorjkim <jkim@FreeBSD.org>2014-06-27 19:10:35 +0000
committerjkim <jkim@FreeBSD.org>2014-06-27 19:10:35 +0000
commitb4cfb84e01b0a37b535b69118259bb16e9614b0f (patch)
treeeeef1a6644e518893667349342fa66f9f0249fec /source/components/disassembler/dmwalk.c
parent34dc9d28dcb64ffb397ae86712fcea0cce546203 (diff)
downloadFreeBSD-src-b4cfb84e01b0a37b535b69118259bb16e9614b0f.zip
FreeBSD-src-b4cfb84e01b0a37b535b69118259bb16e9614b0f.tar.gz
Import ACPICA 20140627.
Diffstat (limited to 'source/components/disassembler/dmwalk.c')
-rw-r--r--source/components/disassembler/dmwalk.c28
1 files changed, 17 insertions, 11 deletions
diff --git a/source/components/disassembler/dmwalk.c b/source/components/disassembler/dmwalk.c
index 3cf74b3..0aa3052 100644
--- a/source/components/disassembler/dmwalk.c
+++ b/source/components/disassembler/dmwalk.c
@@ -958,6 +958,13 @@ AcpiDmAscendingOp (
}
/*
+ * The parent Op is guaranteed to be valid because of the flag
+ * ACPI_PARSEOP_PARAMLIST -- which means that this op is part of
+ * a parameter list and thus has a valid parent.
+ */
+ ParentOp = Op->Common.Parent;
+
+ /*
* Just completed a parameter node for something like "Buffer (param)".
* Close the paren and open up the term list block with a brace
*/
@@ -965,25 +972,24 @@ AcpiDmAscendingOp (
{
AcpiOsPrintf (")");
- /* Emit description comment for Name() with a predefined ACPI name */
-
- ParentOp = Op->Common.Parent;
- if (ParentOp)
+ /*
+ * Emit a description comment for a Name() operator that is a
+ * predefined ACPI name. Must check the grandparent.
+ */
+ ParentOp = ParentOp->Common.Parent;
+ if (ParentOp &&
+ (ParentOp->Asl.AmlOpcode == AML_NAME_OP))
{
- ParentOp = ParentOp->Common.Parent;
- if (ParentOp && ParentOp->Asl.AmlOpcode == AML_NAME_OP)
- {
- AcpiDmPredefinedDescription (ParentOp);
- }
+ AcpiDmPredefinedDescription (ParentOp);
}
+
AcpiOsPrintf ("\n");
AcpiDmIndent (Level - 1);
AcpiOsPrintf ("{\n");
}
else
{
- Op->Common.Parent->Common.DisasmFlags |=
- ACPI_PARSEOP_EMPTY_TERMLIST;
+ ParentOp->Common.DisasmFlags |= ACPI_PARSEOP_EMPTY_TERMLIST;
AcpiOsPrintf (") {");
}
}
OpenPOWER on IntegriCloud