diff options
Diffstat (limited to 'drivers/acpi/utilities/utdelete.c')
-rw-r--r-- | drivers/acpi/utilities/utdelete.c | 24 |
1 files changed, 9 insertions, 15 deletions
diff --git a/drivers/acpi/utilities/utdelete.c b/drivers/acpi/utilities/utdelete.c index 0bb4b59b2804..67b9f325c6fa 100644 --- a/drivers/acpi/utilities/utdelete.c +++ b/drivers/acpi/utilities/utdelete.c | |||
@@ -319,11 +319,9 @@ acpi_ut_update_ref_count(union acpi_operand_object *object, u32 action) | |||
319 | new_count = count; | 319 | new_count = count; |
320 | 320 | ||
321 | /* | 321 | /* |
322 | * Perform the reference count action | 322 | * Perform the reference count action (increment, decrement, force delete) |
323 | * (increment, decrement, or force delete) | ||
324 | */ | 323 | */ |
325 | switch (action) { | 324 | switch (action) { |
326 | |||
327 | case REF_INCREMENT: | 325 | case REF_INCREMENT: |
328 | 326 | ||
329 | new_count++; | 327 | new_count++; |
@@ -360,7 +358,6 @@ acpi_ut_update_ref_count(union acpi_operand_object *object, u32 action) | |||
360 | if (new_count == 0) { | 358 | if (new_count == 0) { |
361 | acpi_ut_delete_internal_obj(object); | 359 | acpi_ut_delete_internal_obj(object); |
362 | } | 360 | } |
363 | |||
364 | break; | 361 | break; |
365 | 362 | ||
366 | case REF_FORCE_DELETE: | 363 | case REF_FORCE_DELETE: |
@@ -385,13 +382,10 @@ acpi_ut_update_ref_count(union acpi_operand_object *object, u32 action) | |||
385 | * (A deleted object will have a huge reference count) | 382 | * (A deleted object will have a huge reference count) |
386 | */ | 383 | */ |
387 | if (count > ACPI_MAX_REFERENCE_COUNT) { | 384 | if (count > ACPI_MAX_REFERENCE_COUNT) { |
388 | |||
389 | ACPI_WARNING((AE_INFO, | 385 | ACPI_WARNING((AE_INFO, |
390 | "Large Reference Count (%X) in object %p", | 386 | "Large Reference Count (%X) in object %p", count, |
391 | count, object)); | 387 | object)); |
392 | } | 388 | } |
393 | |||
394 | return; | ||
395 | } | 389 | } |
396 | 390 | ||
397 | /******************************************************************************* | 391 | /******************************************************************************* |
@@ -417,7 +411,7 @@ acpi_ut_update_ref_count(union acpi_operand_object *object, u32 action) | |||
417 | ******************************************************************************/ | 411 | ******************************************************************************/ |
418 | 412 | ||
419 | acpi_status | 413 | acpi_status |
420 | acpi_ut_update_object_reference(union acpi_operand_object * object, u16 action) | 414 | acpi_ut_update_object_reference(union acpi_operand_object *object, u16 action) |
421 | { | 415 | { |
422 | acpi_status status = AE_OK; | 416 | acpi_status status = AE_OK; |
423 | union acpi_generic_state *state_list = NULL; | 417 | union acpi_generic_state *state_list = NULL; |
@@ -521,11 +515,11 @@ acpi_ut_update_object_reference(union acpi_operand_object * object, u16 action) | |||
521 | 515 | ||
522 | case ACPI_TYPE_REGION: | 516 | case ACPI_TYPE_REGION: |
523 | default: | 517 | default: |
524 | break; /* No subobjects */ | 518 | break; /* No subobjects for all other types */ |
525 | } | 519 | } |
526 | 520 | ||
527 | /* | 521 | /* |
528 | * Now we can update the count in the main object. This can only | 522 | * Now we can update the count in the main object. This can only |
529 | * happen after we update the sub-objects in case this causes the | 523 | * happen after we update the sub-objects in case this causes the |
530 | * main object to be deleted. | 524 | * main object to be deleted. |
531 | */ | 525 | */ |
@@ -606,8 +600,8 @@ void acpi_ut_remove_reference(union acpi_operand_object *object) | |||
606 | ACPI_FUNCTION_TRACE_PTR(ut_remove_reference, object); | 600 | ACPI_FUNCTION_TRACE_PTR(ut_remove_reference, object); |
607 | 601 | ||
608 | /* | 602 | /* |
609 | * Allow a NULL pointer to be passed in, just ignore it. This saves | 603 | * Allow a NULL pointer to be passed in, just ignore it. This saves |
610 | * each caller from having to check. Also, ignore NS nodes. | 604 | * each caller from having to check. Also, ignore NS nodes. |
611 | * | 605 | * |
612 | */ | 606 | */ |
613 | if (!object || | 607 | if (!object || |
@@ -627,7 +621,7 @@ void acpi_ut_remove_reference(union acpi_operand_object *object) | |||
627 | 621 | ||
628 | /* | 622 | /* |
629 | * Decrement the reference count, and only actually delete the object | 623 | * Decrement the reference count, and only actually delete the object |
630 | * if the reference count becomes 0. (Must also decrement the ref count | 624 | * if the reference count becomes 0. (Must also decrement the ref count |
631 | * of all subobjects!) | 625 | * of all subobjects!) |
632 | */ | 626 | */ |
633 | (void)acpi_ut_update_object_reference(object, REF_DECREMENT); | 627 | (void)acpi_ut_update_object_reference(object, REF_DECREMENT); |