From de87ee3adafa4328c3afe008b058052873f4e60d Mon Sep 17 00:00:00 2001 From: Mike Smith Date: Wed, 28 Nov 2001 04:29:40 +0000 Subject: Vendor import of the Intel ACPI CA 20011120 snapshot. --- sys/contrib/dev/acpica/nsalloc.c | 25 +++++++++---------------- 1 file changed, 9 insertions(+), 16 deletions(-) (limited to 'sys/contrib/dev/acpica/nsalloc.c') diff --git a/sys/contrib/dev/acpica/nsalloc.c b/sys/contrib/dev/acpica/nsalloc.c index 0958bcca302c..52afd73e8745 100644 --- a/sys/contrib/dev/acpica/nsalloc.c +++ b/sys/contrib/dev/acpica/nsalloc.c @@ -1,7 +1,7 @@ /******************************************************************************* * * Module Name: nsalloc - Namespace allocation and deletion utilities - * $Revision: 60 $ + * $Revision: 62 $ * ******************************************************************************/ @@ -216,13 +216,9 @@ AcpiNsDeleteNode ( ACPI_MEM_TRACKING (AcpiGbl_MemoryLists[ACPI_MEM_LIST_NSNODE].TotalFreed++); /* - * Detach an object if there is one + * Detach an object if there is one then delete the node */ - if (Node->Object) - { - AcpiNsDetachObject (Node); - } - + AcpiNsDetachObject (Node); ACPI_MEM_FREE (Node); return_VOID; } @@ -239,7 +235,11 @@ AcpiNsDeleteNode ( * * RETURN: None * - * DESCRIPTION: Initialize a new entry within a namespace table. + * DESCRIPTION: Initialize a new namespace node and install it amongst + * its peers. + * + * Note: Current namespace lookup is linear search, so the nodes + * are not linked in any particular order. * ******************************************************************************/ @@ -267,17 +267,13 @@ AcpiNsInstallNode ( OwnerId = WalkState->OwnerId; } - - /* link the new entry into the parent and existing children */ - - /* TBD: Could be first, last, or alphabetic */ + /* Link the new entry into the parent and existing children */ ChildNode = ParentNode->Child; if (!ChildNode) { ParentNode->Child = Node; } - else { while (!(ChildNode->Flags & ANOBJ_END_OF_PEER_LIST)) @@ -498,7 +494,6 @@ AcpiNsDeleteNamespaceSubtree ( ChildNode = 0; } } - else { /* @@ -641,13 +636,11 @@ AcpiNsDeleteNamespaceByOwner ( ParentNode = ChildNode; ChildNode = 0; } - else if (ChildNode->OwnerId == OwnerId) { AcpiNsRemoveReference (ChildNode); } } - else { /* -- cgit v1.2.3