diff options
Diffstat (limited to 'source/components/namespace')
-rw-r--r-- | source/components/namespace/nsaccess.c | 2 | ||||
-rw-r--r-- | source/components/namespace/nsrepair.c | 16 | ||||
-rw-r--r-- | source/components/namespace/nsrepair2.c | 6 | ||||
-rw-r--r-- | source/components/namespace/nsutils.c | 31 |
4 files changed, 17 insertions, 38 deletions
diff --git a/source/components/namespace/nsaccess.c b/source/components/namespace/nsaccess.c index 2dd55c44f69a..7b5715be30e3 100644 --- a/source/components/namespace/nsaccess.c +++ b/source/components/namespace/nsaccess.c @@ -505,7 +505,7 @@ AcpiNsLookup ( "Dual Pathname (2 segments, Flags=%X)\n", Flags)); break; - case AML_MULTI_NAME_PREFIX_OP: + case AML_MULTI_NAME_PREFIX: /* More than one NameSeg, search rules do not apply */ diff --git a/source/components/namespace/nsrepair.c b/source/components/namespace/nsrepair.c index 96dd88562e04..59957e4e7a09 100644 --- a/source/components/namespace/nsrepair.c +++ b/source/components/namespace/nsrepair.c @@ -302,24 +302,12 @@ ObjectRepaired: if (PackageIndex != ACPI_NOT_PACKAGE_ELEMENT) { - /* - * The original object is a package element. We need to - * decrement the reference count of the original object, - * for removing it from the package. - * - * However, if the original object was just wrapped with a - * package object as part of the repair, we don't need to - * change the reference count. - */ + /* Update reference count of new object */ + if (!(Info->ReturnFlags & ACPI_OBJECT_WRAPPED)) { NewObject->Common.ReferenceCount = ReturnObject->Common.ReferenceCount; - - if (ReturnObject->Common.ReferenceCount > 1) - { - ReturnObject->Common.ReferenceCount--; - } } ACPI_DEBUG_PRINT ((ACPI_DB_REPAIR, diff --git a/source/components/namespace/nsrepair2.c b/source/components/namespace/nsrepair2.c index fe8b763903a7..22ac8702c903 100644 --- a/source/components/namespace/nsrepair2.c +++ b/source/components/namespace/nsrepair2.c @@ -448,16 +448,12 @@ AcpiNsRepair_CID ( return (Status); } - /* Take care with reference counts */ - if (OriginalElement != *ElementPtr) { - /* Element was replaced */ + /* Update reference count of new object */ (*ElementPtr)->Common.ReferenceCount = OriginalRefCount; - - AcpiUtRemoveReference (OriginalElement); } ElementPtr++; diff --git a/source/components/namespace/nsutils.c b/source/components/namespace/nsutils.c index 3664cbe4657e..652b19c12e2c 100644 --- a/source/components/namespace/nsutils.c +++ b/source/components/namespace/nsutils.c @@ -294,7 +294,7 @@ AcpiNsBuildInternalName ( } else { - InternalName[1] = AML_MULTI_NAME_PREFIX_OP; + InternalName[1] = AML_MULTI_NAME_PREFIX; InternalName[2] = (char) NumSegments; Result = &InternalName[3]; } @@ -325,7 +325,7 @@ AcpiNsBuildInternalName ( } else { - InternalName[i] = AML_MULTI_NAME_PREFIX_OP; + InternalName[i] = AML_MULTI_NAME_PREFIX; InternalName[(ACPI_SIZE) i+1] = (char) NumSegments; Result = &InternalName[(ACPI_SIZE) i+2]; } @@ -534,7 +534,7 @@ AcpiNsExternalizeName ( { switch (InternalName[PrefixLength]) { - case AML_MULTI_NAME_PREFIX_OP: + case AML_MULTI_NAME_PREFIX: /* <count> 4-byte names */ @@ -694,28 +694,23 @@ AcpiNsTerminate ( void) { ACPI_STATUS Status; + ACPI_OPERAND_OBJECT *Prev; + ACPI_OPERAND_OBJECT *Next; ACPI_FUNCTION_TRACE (NsTerminate); -#ifdef ACPI_EXEC_APP - { - ACPI_OPERAND_OBJECT *Prev; - ACPI_OPERAND_OBJECT *Next; - - /* Delete any module-level code blocks */ + /* Delete any module-level code blocks */ - Next = AcpiGbl_ModuleCodeList; - while (Next) - { - Prev = Next; - Next = Next->Method.Mutex; - Prev->Method.Mutex = NULL; /* Clear the Mutex (cheated) field */ - AcpiUtRemoveReference (Prev); - } + Next = AcpiGbl_ModuleCodeList; + while (Next) + { + Prev = Next; + Next = Next->Method.Mutex; + Prev->Method.Mutex = NULL; /* Clear the Mutex (cheated) field */ + AcpiUtRemoveReference (Prev); } -#endif /* * Free the entire namespace -- all nodes and all objects |