aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/acpica/utmutex.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/acpica/utmutex.c')
-rw-r--r--drivers/acpi/acpica/utmutex.c16
1 files changed, 3 insertions, 13 deletions
diff --git a/drivers/acpi/acpica/utmutex.c b/drivers/acpi/acpica/utmutex.c
index 80bb65154117..1f58a8824146 100644
--- a/drivers/acpi/acpica/utmutex.c
+++ b/drivers/acpi/acpica/utmutex.c
@@ -50,7 +50,7 @@ ACPI_MODULE_NAME("utmutex")
50/* Local prototypes */ 50/* Local prototypes */
51static acpi_status acpi_ut_create_mutex(acpi_mutex_handle mutex_id); 51static acpi_status acpi_ut_create_mutex(acpi_mutex_handle mutex_id);
52 52
53static acpi_status acpi_ut_delete_mutex(acpi_mutex_handle mutex_id); 53static void acpi_ut_delete_mutex(acpi_mutex_handle mutex_id);
54 54
55/******************************************************************************* 55/*******************************************************************************
56 * 56 *
@@ -114,7 +114,7 @@ void acpi_ut_mutex_terminate(void)
114 /* Delete each predefined mutex object */ 114 /* Delete each predefined mutex object */
115 115
116 for (i = 0; i < ACPI_NUM_MUTEX; i++) { 116 for (i = 0; i < ACPI_NUM_MUTEX; i++) {
117 (void)acpi_ut_delete_mutex(i); 117 acpi_ut_delete_mutex(i);
118 } 118 }
119 119
120 /* Delete the spinlocks */ 120 /* Delete the spinlocks */
@@ -146,10 +146,6 @@ static acpi_status acpi_ut_create_mutex(acpi_mutex_handle mutex_id)
146 146
147 ACPI_FUNCTION_TRACE_U32(ut_create_mutex, mutex_id); 147 ACPI_FUNCTION_TRACE_U32(ut_create_mutex, mutex_id);
148 148
149 if (mutex_id > ACPI_MAX_MUTEX) {
150 return_ACPI_STATUS(AE_BAD_PARAMETER);
151 }
152
153 if (!acpi_gbl_mutex_info[mutex_id].mutex) { 149 if (!acpi_gbl_mutex_info[mutex_id].mutex) {
154 status = 150 status =
155 acpi_os_create_mutex(&acpi_gbl_mutex_info[mutex_id].mutex); 151 acpi_os_create_mutex(&acpi_gbl_mutex_info[mutex_id].mutex);
@@ -173,21 +169,15 @@ static acpi_status acpi_ut_create_mutex(acpi_mutex_handle mutex_id)
173 * 169 *
174 ******************************************************************************/ 170 ******************************************************************************/
175 171
176static acpi_status acpi_ut_delete_mutex(acpi_mutex_handle mutex_id) 172static void acpi_ut_delete_mutex(acpi_mutex_handle mutex_id)
177{ 173{
178 174
179 ACPI_FUNCTION_TRACE_U32(ut_delete_mutex, mutex_id); 175 ACPI_FUNCTION_TRACE_U32(ut_delete_mutex, mutex_id);
180 176
181 if (mutex_id > ACPI_MAX_MUTEX) {
182 return_ACPI_STATUS(AE_BAD_PARAMETER);
183 }
184
185 acpi_os_delete_mutex(acpi_gbl_mutex_info[mutex_id].mutex); 177 acpi_os_delete_mutex(acpi_gbl_mutex_info[mutex_id].mutex);
186 178
187 acpi_gbl_mutex_info[mutex_id].mutex = NULL; 179 acpi_gbl_mutex_info[mutex_id].mutex = NULL;
188 acpi_gbl_mutex_info[mutex_id].thread_id = ACPI_MUTEX_NOT_ACQUIRED; 180 acpi_gbl_mutex_info[mutex_id].thread_id = ACPI_MUTEX_NOT_ACQUIRED;
189
190 return_ACPI_STATUS(AE_OK);
191} 181}
192 182
193/******************************************************************************* 183/*******************************************************************************