diff options
Diffstat (limited to 'drivers/acpi/acpica/utdelete.c')
-rw-r--r-- | drivers/acpi/acpica/utdelete.c | 38 |
1 files changed, 24 insertions, 14 deletions
diff --git a/drivers/acpi/acpica/utdelete.c b/drivers/acpi/acpica/utdelete.c index 2a6c3e183697..798105443d0f 100644 --- a/drivers/acpi/acpica/utdelete.c +++ b/drivers/acpi/acpica/utdelete.c | |||
@@ -60,7 +60,7 @@ acpi_ut_update_ref_count(union acpi_operand_object *object, u32 action); | |||
60 | * | 60 | * |
61 | * FUNCTION: acpi_ut_delete_internal_obj | 61 | * FUNCTION: acpi_ut_delete_internal_obj |
62 | * | 62 | * |
63 | * PARAMETERS: Object - Object to be deleted | 63 | * PARAMETERS: object - Object to be deleted |
64 | * | 64 | * |
65 | * RETURN: None | 65 | * RETURN: None |
66 | * | 66 | * |
@@ -152,7 +152,7 @@ static void acpi_ut_delete_internal_obj(union acpi_operand_object *object) | |||
152 | case ACPI_TYPE_PROCESSOR: | 152 | case ACPI_TYPE_PROCESSOR: |
153 | case ACPI_TYPE_THERMAL: | 153 | case ACPI_TYPE_THERMAL: |
154 | 154 | ||
155 | /* Walk the notify handler list for this object */ | 155 | /* Walk the address handler list for this object */ |
156 | 156 | ||
157 | handler_desc = object->common_notify.handler; | 157 | handler_desc = object->common_notify.handler; |
158 | while (handler_desc) { | 158 | while (handler_desc) { |
@@ -358,8 +358,8 @@ void acpi_ut_delete_internal_object_list(union acpi_operand_object **obj_list) | |||
358 | * | 358 | * |
359 | * FUNCTION: acpi_ut_update_ref_count | 359 | * FUNCTION: acpi_ut_update_ref_count |
360 | * | 360 | * |
361 | * PARAMETERS: Object - Object whose ref count is to be updated | 361 | * PARAMETERS: object - Object whose ref count is to be updated |
362 | * Action - What to do | 362 | * action - What to do |
363 | * | 363 | * |
364 | * RETURN: New ref count | 364 | * RETURN: New ref count |
365 | * | 365 | * |
@@ -456,9 +456,9 @@ acpi_ut_update_ref_count(union acpi_operand_object *object, u32 action) | |||
456 | * | 456 | * |
457 | * FUNCTION: acpi_ut_update_object_reference | 457 | * FUNCTION: acpi_ut_update_object_reference |
458 | * | 458 | * |
459 | * PARAMETERS: Object - Increment ref count for this object | 459 | * PARAMETERS: object - Increment ref count for this object |
460 | * and all sub-objects | 460 | * and all sub-objects |
461 | * Action - Either REF_INCREMENT or REF_DECREMENT or | 461 | * action - Either REF_INCREMENT or REF_DECREMENT or |
462 | * REF_FORCE_DELETE | 462 | * REF_FORCE_DELETE |
463 | * | 463 | * |
464 | * RETURN: Status | 464 | * RETURN: Status |
@@ -480,6 +480,7 @@ acpi_ut_update_object_reference(union acpi_operand_object *object, u16 action) | |||
480 | acpi_status status = AE_OK; | 480 | acpi_status status = AE_OK; |
481 | union acpi_generic_state *state_list = NULL; | 481 | union acpi_generic_state *state_list = NULL; |
482 | union acpi_operand_object *next_object = NULL; | 482 | union acpi_operand_object *next_object = NULL; |
483 | union acpi_operand_object *prev_object; | ||
483 | union acpi_generic_state *state; | 484 | union acpi_generic_state *state; |
484 | u32 i; | 485 | u32 i; |
485 | 486 | ||
@@ -505,12 +506,21 @@ acpi_ut_update_object_reference(union acpi_operand_object *object, u16 action) | |||
505 | case ACPI_TYPE_POWER: | 506 | case ACPI_TYPE_POWER: |
506 | case ACPI_TYPE_THERMAL: | 507 | case ACPI_TYPE_THERMAL: |
507 | 508 | ||
508 | /* Update the notify objects for these types (if present) */ | 509 | /* |
509 | 510 | * Update the notify objects for these types (if present) | |
510 | acpi_ut_update_ref_count(object->common_notify. | 511 | * Two lists, system and device notify handlers. |
511 | system_notify, action); | 512 | */ |
512 | acpi_ut_update_ref_count(object->common_notify. | 513 | for (i = 0; i < ACPI_NUM_NOTIFY_TYPES; i++) { |
513 | device_notify, action); | 514 | prev_object = |
515 | object->common_notify.notify_list[i]; | ||
516 | while (prev_object) { | ||
517 | next_object = | ||
518 | prev_object->notify.next[i]; | ||
519 | acpi_ut_update_ref_count(prev_object, | ||
520 | action); | ||
521 | prev_object = next_object; | ||
522 | } | ||
523 | } | ||
514 | break; | 524 | break; |
515 | 525 | ||
516 | case ACPI_TYPE_PACKAGE: | 526 | case ACPI_TYPE_PACKAGE: |
@@ -630,7 +640,7 @@ acpi_ut_update_object_reference(union acpi_operand_object *object, u16 action) | |||
630 | * | 640 | * |
631 | * FUNCTION: acpi_ut_add_reference | 641 | * FUNCTION: acpi_ut_add_reference |
632 | * | 642 | * |
633 | * PARAMETERS: Object - Object whose reference count is to be | 643 | * PARAMETERS: object - Object whose reference count is to be |
634 | * incremented | 644 | * incremented |
635 | * | 645 | * |
636 | * RETURN: None | 646 | * RETURN: None |
@@ -664,7 +674,7 @@ void acpi_ut_add_reference(union acpi_operand_object *object) | |||
664 | * | 674 | * |
665 | * FUNCTION: acpi_ut_remove_reference | 675 | * FUNCTION: acpi_ut_remove_reference |
666 | * | 676 | * |
667 | * PARAMETERS: Object - Object whose ref count will be decremented | 677 | * PARAMETERS: object - Object whose ref count will be decremented |
668 | * | 678 | * |
669 | * RETURN: None | 679 | * RETURN: None |
670 | * | 680 | * |