diff options
Diffstat (limited to 'drivers/acpi/utilities/utdelete.c')
-rw-r--r-- | drivers/acpi/utilities/utdelete.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/drivers/acpi/utilities/utdelete.c b/drivers/acpi/utilities/utdelete.c index 9d3f1149ba21..af8e65f17fb7 100644 --- a/drivers/acpi/utilities/utdelete.c +++ b/drivers/acpi/utilities/utdelete.c | |||
@@ -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 | ||