diff options
Diffstat (limited to 'drivers/acpi/acpica/utmutex.c')
-rw-r--r-- | drivers/acpi/acpica/utmutex.c | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/drivers/acpi/acpica/utmutex.c b/drivers/acpi/acpica/utmutex.c index 80bb65154117..55d014ed6d55 100644 --- a/drivers/acpi/acpica/utmutex.c +++ b/drivers/acpi/acpica/utmutex.c | |||
@@ -5,7 +5,7 @@ | |||
5 | ******************************************************************************/ | 5 | ******************************************************************************/ |
6 | 6 | ||
7 | /* | 7 | /* |
8 | * Copyright (C) 2000 - 2008, Intel Corp. | 8 | * Copyright (C) 2000 - 2010, Intel Corp. |
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 |
@@ -50,7 +50,7 @@ ACPI_MODULE_NAME("utmutex") | |||
50 | /* Local prototypes */ | 50 | /* Local prototypes */ |
51 | static acpi_status acpi_ut_create_mutex(acpi_mutex_handle mutex_id); | 51 | static acpi_status acpi_ut_create_mutex(acpi_mutex_handle mutex_id); |
52 | 52 | ||
53 | static acpi_status acpi_ut_delete_mutex(acpi_mutex_handle mutex_id); | 53 | static 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 | ||
176 | static acpi_status acpi_ut_delete_mutex(acpi_mutex_handle mutex_id) | 172 | static 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 | /******************************************************************************* |