}
if (prev_node) {
+
/* Node is not first child, unlink it */
prev_node->peer = next_node->peer;
/* Node is first child (has no previous peer) */
if (next_node->flags & ANOBJ_END_OF_PEER_LIST) {
+
/* No peers at all */
parent_node->child = NULL;
* Deallocate all children at this level
*/
do {
+
/* Get the things we need */
next_node = child_node->peer;
* to where we started.
*/
while (level > 0) {
+
/* Get the next node in this scope (NULL if none) */
child_node = acpi_ns_get_next_node(ACPI_TYPE_ANY, parent_node,
child_node);
if (child_node) {
+
/* Found a child node - detach any attached object */
acpi_ns_detach_object(child_node);
*/
this_node = node;
while (this_node) {
+
/* Prepare to move up to parent */
parent_node = acpi_ns_get_parent_node(this_node);
/* Delete the node if no more references */
if (!this_node->reference_count) {
+
/* Delete all children and delete the node */
acpi_ns_delete_children(this_node);
if (child_node) {
if (child_node->owner_id == owner_id) {
+
/* Found a matching child node - detach any attached object */
acpi_ns_detach_object(child_node);