diff options
Diffstat (limited to 'drivers/acpi/utilities/utdelete.c')
-rw-r--r-- | drivers/acpi/utilities/utdelete.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/drivers/acpi/utilities/utdelete.c b/drivers/acpi/utilities/utdelete.c index 9d3f1149ba21..f777cebdc46d 100644 --- a/drivers/acpi/utilities/utdelete.c +++ b/drivers/acpi/utilities/utdelete.c | |||
@@ -5,7 +5,7 @@ | |||
5 | ******************************************************************************/ | 5 | ******************************************************************************/ |
6 | 6 | ||
7 | /* | 7 | /* |
8 | * Copyright (C) 2000 - 2006, R. Byron Moore | 8 | * Copyright (C) 2000 - 2007, R. Byron Moore |
9 | * All rights reserved. | 9 | * All rights reserved. |
10 | * | 10 | * |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
@@ -158,16 +158,20 @@ static void acpi_ut_delete_internal_obj(union acpi_operand_object *object) | |||
158 | "***** Mutex %p, OS Mutex %p\n", | 158 | "***** Mutex %p, OS Mutex %p\n", |
159 | object, object->mutex.os_mutex)); | 159 | object, object->mutex.os_mutex)); |
160 | 160 | ||
161 | if (object->mutex.os_mutex != ACPI_GLOBAL_LOCK) { | 161 | if (object->mutex.os_mutex == acpi_gbl_global_lock_mutex) { |
162 | acpi_ex_unlink_mutex(object); | 162 | |
163 | acpi_os_delete_mutex(object->mutex.os_mutex); | 163 | /* Global Lock has extra semaphore */ |
164 | } else { | ||
165 | /* Global Lock "mutex" is actually a counting semaphore */ | ||
166 | 164 | ||
167 | (void) | 165 | (void) |
168 | acpi_os_delete_semaphore | 166 | acpi_os_delete_semaphore |
169 | (acpi_gbl_global_lock_semaphore); | 167 | (acpi_gbl_global_lock_semaphore); |
170 | acpi_gbl_global_lock_semaphore = NULL; | 168 | acpi_gbl_global_lock_semaphore = NULL; |
169 | |||
170 | acpi_os_delete_mutex(object->mutex.os_mutex); | ||
171 | acpi_gbl_global_lock_mutex = NULL; | ||
172 | } else { | ||
173 | acpi_ex_unlink_mutex(object); | ||
174 | acpi_os_delete_mutex(object->mutex.os_mutex); | ||
171 | } | 175 | } |
172 | break; | 176 | break; |
173 | 177 | ||