ACPICA: Fix mutex debug code for wrong loop termination value
authorBob Moore <robert.moore@intel.com>
Tue, 10 Jun 2008 06:30:04 +0000 (14:30 +0800)
committerAndi Kleen <andi@basil.nowhere.org>
Wed, 16 Jul 2008 21:27:04 +0000 (23:27 +0200)
Loop was terminating one iteration early, missing one of the
debugger handshake mutexes. Linn Crosetto.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
drivers/acpi/utilities/utmutex.c

index f7d602b..7331dde 100644 (file)
@@ -218,7 +218,7 @@ acpi_status acpi_ut_acquire_mutex(acpi_mutex_handle mutex_id)
                 * the mutex ordering rule.  This indicates a coding error somewhere in
                 * the ACPI subsystem code.
                 */
-               for (i = mutex_id; i < ACPI_MAX_MUTEX; i++) {
+               for (i = mutex_id; i < ACPI_NUM_MUTEX; i++) {
                        if (acpi_gbl_mutex_info[i].thread_id == this_thread_id) {
                                if (i == mutex_id) {
                                        ACPI_ERROR((AE_INFO,
@@ -315,7 +315,7 @@ acpi_status acpi_ut_release_mutex(acpi_mutex_handle mutex_id)
                 * ordering rule.  This indicates a coding error somewhere in
                 * the ACPI subsystem code.
                 */
-               for (i = mutex_id; i < ACPI_MAX_MUTEX; i++) {
+               for (i = mutex_id; i < ACPI_NUM_MUTEX; i++) {
                        if (acpi_gbl_mutex_info[i].thread_id == this_thread_id) {
                                if (i == mutex_id) {
                                        continue;