diff options
author | Mitsuru IWASAKI <iwasaki@FreeBSD.org> | 2002-07-30 19:33:39 +0000 |
---|---|---|
committer | Mitsuru IWASAKI <iwasaki@FreeBSD.org> | 2002-07-30 19:33:39 +0000 |
commit | da9df8d45ead3bbba4e8696570189867fc8aed32 (patch) | |
tree | 2e03b6e287adc36cfd606a3f67a664bd5222e1a3 /sys/contrib/dev/acpica/psutils.c | |
parent | 7174287062b13041257019f445469f00eaaf9c76 (diff) | |
download | src-test2-da9df8d45ead3bbba4e8696570189867fc8aed32.tar.gz src-test2-da9df8d45ead3bbba4e8696570189867fc8aed32.zip |
Notes
Diffstat (limited to 'sys/contrib/dev/acpica/psutils.c')
-rw-r--r-- | sys/contrib/dev/acpica/psutils.c | 38 |
1 files changed, 35 insertions, 3 deletions
diff --git a/sys/contrib/dev/acpica/psutils.c b/sys/contrib/dev/acpica/psutils.c index 76ac4aaea6d8..ab9250d42a90 100644 --- a/sys/contrib/dev/acpica/psutils.c +++ b/sys/contrib/dev/acpica/psutils.c @@ -1,7 +1,7 @@ /****************************************************************************** * * Module Name: psutils - Parser miscellaneous utilities (Parser only) - * $Revision: 51 $ + * $Revision: 54 $ * *****************************************************************************/ @@ -118,6 +118,7 @@ #include "acpi.h" #include "acparser.h" #include "amlcode.h" +#include "acnamesp.h" #define _COMPONENT ACPI_PARSER ACPI_MODULE_NAME ("psutils") @@ -125,6 +126,37 @@ /******************************************************************************* * + * FUNCTION: AcpiPsCreateScopeOp + * + * PARAMETERS: None + * + * RETURN: ScopeOp + * + * DESCRIPTION: Create a Scope and associated namepath op with the root name + * + ******************************************************************************/ + +ACPI_PARSE_OBJECT * +AcpiPsCreateScopeOp ( + void) +{ + ACPI_PARSE_OBJECT *ScopeOp; + + + ScopeOp = AcpiPsAllocOp (AML_SCOPE_OP); + if (!ScopeOp) + { + return (NULL); + } + + + ScopeOp->Named.Name = ACPI_ROOT_NAME; + return (ScopeOp); +} + + +/******************************************************************************* + * * FUNCTION: AcpiPsInitOp * * PARAMETERS: Op - A newly allocated Op object @@ -148,7 +180,7 @@ AcpiPsInitOp ( Op->Common.DataType = ACPI_DESC_TYPE_PARSER; Op->Common.AmlOpcode = Opcode; - ACPI_DEBUG_ONLY_MEMBERS (ACPI_STRNCPY (Op->Common.AmlOpName, + ACPI_DISASM_ONLY_MEMBERS (ACPI_STRNCPY (Op->Common.AmlOpName, (AcpiPsGetOpcodeInfo (Opcode))->Name, sizeof (Op->Common.AmlOpName))); } @@ -254,7 +286,7 @@ AcpiPsFreeOp ( ACPI_DEBUG_PRINT ((ACPI_DB_ALLOCATIONS, "Free retval op: %p\n", Op)); } - if (Op->Common.Flags == ACPI_PARSEOP_GENERIC) + if (Op->Common.Flags & ACPI_PARSEOP_GENERIC) { AcpiUtReleaseToCache (ACPI_MEM_LIST_PSNODE, Op); } |