diff options
author | Lin Ming <ming.m.lin@intel.com> | 2011-03-23 05:26:35 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2011-03-25 04:32:42 -0400 |
commit | 3854c8e32f46ffa6ee0bf2eb01137f5a48b2754f (patch) | |
tree | 484e424849a8f09de2bed079423ac08d33865abf /drivers/acpi/acpica | |
parent | 9f63b88bd7a1ac1afbb4358772a39abaeddbdd13 (diff) |
ACPICA: Use acpi_os_create_lock interface
Replace spin_lock_init with acpi_os_create_lock.
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/acpica')
-rw-r--r-- | drivers/acpi/acpica/acglobal.h | 9 | ||||
-rw-r--r-- | drivers/acpi/acpica/utmutex.c | 17 |
2 files changed, 17 insertions, 9 deletions
diff --git a/drivers/acpi/acpica/acglobal.h b/drivers/acpi/acpica/acglobal.h index d69750b83b36..6d512fcabdbe 100644 --- a/drivers/acpi/acpica/acglobal.h +++ b/drivers/acpi/acpica/acglobal.h | |||
@@ -226,12 +226,9 @@ ACPI_EXTERN u8 acpi_gbl_global_lock_present; | |||
226 | * Spinlocks are used for interfaces that can be possibly called at | 226 | * Spinlocks are used for interfaces that can be possibly called at |
227 | * interrupt level | 227 | * interrupt level |
228 | */ | 228 | */ |
229 | ACPI_EXTERN spinlock_t _acpi_gbl_gpe_lock; /* For GPE data structs and registers */ | 229 | ACPI_EXTERN acpi_spinlock acpi_gbl_gpe_lock; /* For GPE data structs and registers */ |
230 | ACPI_EXTERN spinlock_t _acpi_gbl_hardware_lock; /* For ACPI H/W except GPE registers */ | 230 | ACPI_EXTERN acpi_spinlock acpi_gbl_hardware_lock; /* For ACPI H/W except GPE registers */ |
231 | ACPI_EXTERN spinlock_t _acpi_ev_global_lock_pending_lock; /* For global lock */ | 231 | ACPI_EXTERN acpi_spinlock acpi_ev_global_lock_pending_lock; /* For global lock */ |
232 | #define acpi_gbl_gpe_lock &_acpi_gbl_gpe_lock | ||
233 | #define acpi_gbl_hardware_lock &_acpi_gbl_hardware_lock | ||
234 | #define acpi_ev_global_lock_pending_lock &_acpi_ev_global_lock_pending_lock | ||
235 | 232 | ||
236 | /***************************************************************************** | 233 | /***************************************************************************** |
237 | * | 234 | * |
diff --git a/drivers/acpi/acpica/utmutex.c b/drivers/acpi/acpica/utmutex.c index a946c689f03b..519d4ee9b45a 100644 --- a/drivers/acpi/acpica/utmutex.c +++ b/drivers/acpi/acpica/utmutex.c | |||
@@ -83,9 +83,20 @@ acpi_status acpi_ut_mutex_initialize(void) | |||
83 | 83 | ||
84 | /* Create the spinlocks for use at interrupt level */ | 84 | /* Create the spinlocks for use at interrupt level */ |
85 | 85 | ||
86 | spin_lock_init(acpi_gbl_gpe_lock); | 86 | status = acpi_os_create_lock (&acpi_gbl_gpe_lock); |
87 | spin_lock_init(acpi_gbl_hardware_lock); | 87 | if (ACPI_FAILURE (status)) { |
88 | spin_lock_init(acpi_ev_global_lock_pending_lock); | 88 | return_ACPI_STATUS (status); |
89 | } | ||
90 | |||
91 | status = acpi_os_create_lock (&acpi_gbl_hardware_lock); | ||
92 | if (ACPI_FAILURE (status)) { | ||
93 | return_ACPI_STATUS (status); | ||
94 | } | ||
95 | |||
96 | status = acpi_os_create_lock (&acpi_ev_global_lock_pending_lock); | ||
97 | if (ACPI_FAILURE (status)) { | ||
98 | return_ACPI_STATUS (status); | ||
99 | } | ||
89 | 100 | ||
90 | /* Mutex for _OSI support */ | 101 | /* Mutex for _OSI support */ |
91 | status = acpi_os_create_mutex(&acpi_gbl_osi_mutex); | 102 | status = acpi_os_create_mutex(&acpi_gbl_osi_mutex); |