summaryrefslogtreecommitdiff
path: root/drivers/acpi/utilities/utdelete.c
diff options
context:
space:
mode:
authorKumar Gala <galak@kernel.crashing.org>2007-02-12 21:17:37 -0600
committerKumar Gala <galak@kernel.crashing.org>2007-02-12 21:17:37 -0600
commit06d8bf64ba25db42fcc60d2da2268ac22af94e77 (patch)
treeeb80eebf368957df18c2a4c0ee02897e0a9b06d2 /drivers/acpi/utilities/utdelete.c
parent8f68abbfd9703e58920ff07d314a48654ed0bc3b (diff)
parent5986a2ec35836a878350c54af4bd91b1de6abc59 (diff)
Merge branch 'master' into for_paulus
Diffstat (limited to 'drivers/acpi/utilities/utdelete.c')
-rw-r--r--drivers/acpi/utilities/utdelete.c16
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 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
* All rights reserved.
*
* 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)
"***** Mutex %p, OS Mutex %p\n",
object, object->mutex.os_mutex));
- if (object->mutex.os_mutex != ACPI_GLOBAL_LOCK) {
- acpi_ex_unlink_mutex(object);
- acpi_os_delete_mutex(object->mutex.os_mutex);
- } else {
- /* Global Lock "mutex" is actually a counting semaphore */
+ if (object->mutex.os_mutex == acpi_gbl_global_lock_mutex) {
+
+ /* Global Lock has extra semaphore */
(void)
acpi_os_delete_semaphore
(acpi_gbl_global_lock_semaphore);
acpi_gbl_global_lock_semaphore = NULL;
+
+ 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;