diff options
Diffstat (limited to 'drivers/acpi/namespace/nsalloc.c')
-rw-r--r-- | drivers/acpi/namespace/nsalloc.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/acpi/namespace/nsalloc.c b/drivers/acpi/namespace/nsalloc.c index 9b871f38b61b..cd26cb971a1c 100644 --- a/drivers/acpi/namespace/nsalloc.c +++ b/drivers/acpi/namespace/nsalloc.c | |||
@@ -115,6 +115,7 @@ void acpi_ns_delete_node(struct acpi_namespace_node *node) | |||
115 | } | 115 | } |
116 | 116 | ||
117 | if (prev_node) { | 117 | if (prev_node) { |
118 | |||
118 | /* Node is not first child, unlink it */ | 119 | /* Node is not first child, unlink it */ |
119 | 120 | ||
120 | prev_node->peer = next_node->peer; | 121 | prev_node->peer = next_node->peer; |
@@ -125,6 +126,7 @@ void acpi_ns_delete_node(struct acpi_namespace_node *node) | |||
125 | /* Node is first child (has no previous peer) */ | 126 | /* Node is first child (has no previous peer) */ |
126 | 127 | ||
127 | if (next_node->flags & ANOBJ_END_OF_PEER_LIST) { | 128 | if (next_node->flags & ANOBJ_END_OF_PEER_LIST) { |
129 | |||
128 | /* No peers at all */ | 130 | /* No peers at all */ |
129 | 131 | ||
130 | parent_node->child = NULL; | 132 | parent_node->child = NULL; |
@@ -264,6 +266,7 @@ void acpi_ns_delete_children(struct acpi_namespace_node *parent_node) | |||
264 | * Deallocate all children at this level | 266 | * Deallocate all children at this level |
265 | */ | 267 | */ |
266 | do { | 268 | do { |
269 | |||
267 | /* Get the things we need */ | 270 | /* Get the things we need */ |
268 | 271 | ||
269 | next_node = child_node->peer; | 272 | next_node = child_node->peer; |
@@ -352,11 +355,13 @@ void acpi_ns_delete_namespace_subtree(struct acpi_namespace_node *parent_node) | |||
352 | * to where we started. | 355 | * to where we started. |
353 | */ | 356 | */ |
354 | while (level > 0) { | 357 | while (level > 0) { |
358 | |||
355 | /* Get the next node in this scope (NULL if none) */ | 359 | /* Get the next node in this scope (NULL if none) */ |
356 | 360 | ||
357 | child_node = acpi_ns_get_next_node(ACPI_TYPE_ANY, parent_node, | 361 | child_node = acpi_ns_get_next_node(ACPI_TYPE_ANY, parent_node, |
358 | child_node); | 362 | child_node); |
359 | if (child_node) { | 363 | if (child_node) { |
364 | |||
360 | /* Found a child node - detach any attached object */ | 365 | /* Found a child node - detach any attached object */ |
361 | 366 | ||
362 | acpi_ns_detach_object(child_node); | 367 | acpi_ns_detach_object(child_node); |
@@ -427,6 +432,7 @@ static void acpi_ns_remove_reference(struct acpi_namespace_node *node) | |||
427 | */ | 432 | */ |
428 | this_node = node; | 433 | this_node = node; |
429 | while (this_node) { | 434 | while (this_node) { |
435 | |||
430 | /* Prepare to move up to parent */ | 436 | /* Prepare to move up to parent */ |
431 | 437 | ||
432 | parent_node = acpi_ns_get_parent_node(this_node); | 438 | parent_node = acpi_ns_get_parent_node(this_node); |
@@ -438,6 +444,7 @@ static void acpi_ns_remove_reference(struct acpi_namespace_node *node) | |||
438 | /* Delete the node if no more references */ | 444 | /* Delete the node if no more references */ |
439 | 445 | ||
440 | if (!this_node->reference_count) { | 446 | if (!this_node->reference_count) { |
447 | |||
441 | /* Delete all children and delete the node */ | 448 | /* Delete all children and delete the node */ |
442 | 449 | ||
443 | acpi_ns_delete_children(this_node); | 450 | acpi_ns_delete_children(this_node); |
@@ -500,6 +507,7 @@ void acpi_ns_delete_namespace_by_owner(acpi_owner_id owner_id) | |||
500 | 507 | ||
501 | if (child_node) { | 508 | if (child_node) { |
502 | if (child_node->owner_id == owner_id) { | 509 | if (child_node->owner_id == owner_id) { |
510 | |||
503 | /* Found a matching child node - detach any attached object */ | 511 | /* Found a matching child node - detach any attached object */ |
504 | 512 | ||
505 | acpi_ns_detach_object(child_node); | 513 | acpi_ns_detach_object(child_node); |