Commit 3854c8e3 authored by Lin Ming's avatar Lin Ming Committed by Len Brown

ACPICA: Use acpi_os_create_lock interface

Replace spin_lock_init with acpi_os_create_lock.
Signed-off-by: default avatarLin Ming <ming.m.lin@intel.com>
Signed-off-by: default avatarLen Brown <len.brown@intel.com>
parent 9f63b88b
...@@ -226,12 +226,9 @@ ACPI_EXTERN u8 acpi_gbl_global_lock_present; ...@@ -226,12 +226,9 @@ ACPI_EXTERN u8 acpi_gbl_global_lock_present;
* Spinlocks are used for interfaces that can be possibly called at * Spinlocks are used for interfaces that can be possibly called at
* interrupt level * interrupt level
*/ */
ACPI_EXTERN spinlock_t _acpi_gbl_gpe_lock; /* For GPE data structs and registers */ ACPI_EXTERN acpi_spinlock 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 acpi_spinlock acpi_gbl_hardware_lock; /* For ACPI H/W except GPE registers */
ACPI_EXTERN spinlock_t _acpi_ev_global_lock_pending_lock; /* For global lock */ ACPI_EXTERN acpi_spinlock 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
/***************************************************************************** /*****************************************************************************
* *
......
...@@ -83,9 +83,20 @@ acpi_status acpi_ut_mutex_initialize(void) ...@@ -83,9 +83,20 @@ acpi_status acpi_ut_mutex_initialize(void)
/* Create the spinlocks for use at interrupt level */ /* Create the spinlocks for use at interrupt level */
spin_lock_init(acpi_gbl_gpe_lock); status = acpi_os_create_lock (&acpi_gbl_gpe_lock);
spin_lock_init(acpi_gbl_hardware_lock); if (ACPI_FAILURE (status)) {
spin_lock_init(acpi_ev_global_lock_pending_lock); return_ACPI_STATUS (status);
}
status = acpi_os_create_lock (&acpi_gbl_hardware_lock);
if (ACPI_FAILURE (status)) {
return_ACPI_STATUS (status);
}
status = acpi_os_create_lock (&acpi_ev_global_lock_pending_lock);
if (ACPI_FAILURE (status)) {
return_ACPI_STATUS (status);
}
/* Mutex for _OSI support */ /* Mutex for _OSI support */
status = acpi_os_create_mutex(&acpi_gbl_osi_mutex); status = acpi_os_create_mutex(&acpi_gbl_osi_mutex);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment