X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=drivers%2Facpi%2Futilities%2Futdelete.c;h=1fbc35139e84ebdd85d1c5de4b89c24f04c8e549;hb=2a5f2e3e6cd1ce9fb3f8b186b6bc9aa1f1497a92;hp=673a0caa4073438f3f22af2dcad6a6e9f4bdc029;hpb=08e4a10ec82faf5ba67c8d0115b7bc9e58071555;p=linux-2.6 diff --git a/drivers/acpi/utilities/utdelete.c b/drivers/acpi/utilities/utdelete.c index 673a0caa40..1fbc35139e 100644 --- a/drivers/acpi/utilities/utdelete.c +++ b/drivers/acpi/utilities/utdelete.c @@ -5,7 +5,7 @@ ******************************************************************************/ /* - * Copyright (C) 2000 - 2007, R. Byron Moore + * Copyright (C) 2000 - 2008, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -158,7 +158,7 @@ static void acpi_ut_delete_internal_obj(union acpi_operand_object *object) "***** Mutex %p, OS Mutex %p\n", object, object->mutex.os_mutex)); - if (object->mutex.os_mutex == acpi_gbl_global_lock_mutex) { + if (object == acpi_gbl_global_lock_mutex) { /* Global Lock has extra semaphore */ @@ -170,6 +170,7 @@ static void acpi_ut_delete_internal_obj(union acpi_operand_object *object) acpi_os_delete_mutex(object->mutex.os_mutex); acpi_gbl_global_lock_mutex = NULL; } else { + acpi_ex_unlink_mutex(object); acpi_os_delete_mutex(object->mutex.os_mutex); } break; @@ -251,6 +252,17 @@ static void acpi_ut_delete_internal_obj(union acpi_operand_object *object) } break; + case ACPI_TYPE_LOCAL_BANK_FIELD: + + ACPI_DEBUG_PRINT((ACPI_DB_ALLOCATIONS, + "***** Bank Field %p\n", object)); + + second_desc = acpi_ns_get_secondary_object(object); + if (second_desc) { + acpi_ut_delete_object_desc(second_desc); + } + break; + default: break; } @@ -523,10 +535,12 @@ acpi_ut_update_object_reference(union acpi_operand_object *object, u16 action) case ACPI_TYPE_LOCAL_REFERENCE: /* - * The target of an Index (a package, string, or buffer) must track - * changes to the ref count of the index. + * The target of an Index (a package, string, or buffer) or a named + * reference must track changes to the ref count of the index or + * target object. */ - if (object->reference.opcode == AML_INDEX_OP) { + if ((object->reference.opcode == AML_INDEX_OP) || + (object->reference.opcode == AML_INT_NAMEPATH_OP)) { next_object = object->reference.object; } break;