ACPI / ACPICA: Initialize the global lock spinlock as appropriate
authorRafael J. Wysocki <rjw@sisk.pl>
Fri, 14 Jan 2011 22:25:57 +0000 (23:25 +0100)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 14 Jan 2011 23:21:42 +0000 (15:21 -0800)
Commit 9cd0314 (ACPI / ACPICA: Fix global lock acquisition) forgot to
initialize the spinlock it added.  Fix that.

Reported-and-tested-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Tested-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/acpi/acpica/acglobal.h
drivers/acpi/acpica/evmisc.c
drivers/acpi/acpica/utmutex.c

index 9bb69c59bb12978fb0c33d239f6014007253d28f..0e4dba0d0325329da4c4ebb508c4978c1094190f 100644 (file)
@@ -228,8 +228,10 @@ ACPI_EXTERN u8 acpi_gbl_global_lock_present;
  */
 ACPI_EXTERN spinlock_t _acpi_gbl_gpe_lock;     /* For GPE data structs and registers */
 ACPI_EXTERN spinlock_t _acpi_gbl_hardware_lock;        /* For ACPI H/W except GPE registers */
+ACPI_EXTERN spinlock_t _acpi_ev_global_lock_pending_lock; /* For global lock */
 #define acpi_gbl_gpe_lock      &_acpi_gbl_gpe_lock
 #define acpi_gbl_hardware_lock &_acpi_gbl_hardware_lock
+#define acpi_ev_global_lock_pending_lock &_acpi_ev_global_lock_pending_lock
 
 /*****************************************************************************
  *
index 8e31bb5a973ae2483129781eb756089554d7b694..38bba66fcce554a62ed63b3f5afd76d7d18186ba 100644 (file)
@@ -293,8 +293,6 @@ static void ACPI_SYSTEM_XFACE acpi_ev_notify_dispatch(void *context)
  *
  ******************************************************************************/
 static u8 acpi_ev_global_lock_pending;
-static spinlock_t _acpi_ev_global_lock_pending_lock;
-#define acpi_ev_global_lock_pending_lock &_acpi_ev_global_lock_pending_lock
 
 static u32 acpi_ev_global_lock_handler(void *context)
 {
index d9efa495b4330049a1fa57fde968938c6cb18f0b..199528ff7f1d2edde7b17d832940117b33449a16 100644 (file)
@@ -85,6 +85,7 @@ acpi_status acpi_ut_mutex_initialize(void)
 
        spin_lock_init(acpi_gbl_gpe_lock);
        spin_lock_init(acpi_gbl_hardware_lock);
+       spin_lock_init(acpi_ev_global_lock_pending_lock);
 
        /* Mutex for _OSI support */
        status = acpi_os_create_mutex(&acpi_gbl_osi_mutex);