summaryrefslogtreecommitdiffstats
path: root/sys/contrib/dev/acpica/nsalloc.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/contrib/dev/acpica/nsalloc.c')
-rw-r--r--sys/contrib/dev/acpica/nsalloc.c25
1 files changed, 9 insertions, 16 deletions
diff --git a/sys/contrib/dev/acpica/nsalloc.c b/sys/contrib/dev/acpica/nsalloc.c
index 0958bcc..52afd73 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
{
/*
OpenPOWER on IntegriCloud