Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 350864
b: refs/heads/master
c: 5393855
h: refs/heads/master
v: v3
  • Loading branch information
Chao Guan authored and Rafael J. Wysocki committed Jan 10, 2013
1 parent 1c54cd9 commit b345255
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 227158211e8eba104a477c9a263797256811f206
refs/heads/master: 53938551c827d2016912ae5a431a7dad76c2426a
42 changes: 33 additions & 9 deletions trunk/drivers/acpi/acpica/utdelete.c
Original file line number Diff line number Diff line change
Expand Up @@ -530,18 +530,42 @@ acpi_ut_update_object_reference(union acpi_operand_object *object, u16 action)
*/
for (i = 0; i < object->package.count; i++) {
/*
* Push each element onto the stack for later processing.
* Note: There can be null elements within the package,
* these are simply ignored
* Null package elements are legal and can be simply
* ignored.
*/
status =
acpi_ut_create_update_state_and_push
(object->package.elements[i], action,
&state_list);
if (ACPI_FAILURE(status)) {
goto error_exit;
next_object = object->package.elements[i];
if (!next_object) {
continue;
}

switch (next_object->common.type) {
case ACPI_TYPE_INTEGER:
case ACPI_TYPE_STRING:
case ACPI_TYPE_BUFFER:
/*
* For these very simple sub-objects, we can just
* update the reference count here and continue.
* Greatly increases performance of this operation.
*/
acpi_ut_update_ref_count(next_object,
action);
break;

default:
/*
* For complex sub-objects, push them onto the stack
* for later processing (this eliminates recursion.)
*/
status =
acpi_ut_create_update_state_and_push
(next_object, action, &state_list);
if (ACPI_FAILURE(status)) {
goto error_exit;
}
break;
}
}
next_object = NULL;
break;

case ACPI_TYPE_BUFFER_FIELD:
Expand Down

0 comments on commit b345255

Please sign in to comment.