aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/osl.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/osl.c')
-rw-r--r--drivers/acpi/osl.c28
1 files changed, 7 insertions, 21 deletions
diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c
index 8e46d1b39491..afd937b158b3 100644
--- a/drivers/acpi/osl.c
+++ b/drivers/acpi/osl.c
@@ -688,18 +688,9 @@ EXPORT_SYMBOL(acpi_os_wait_events_complete);
688/* 688/*
689 * Allocate the memory for a spinlock and initialize it. 689 * Allocate the memory for a spinlock and initialize it.
690 */ 690 */
691acpi_status acpi_os_create_lock(acpi_handle * out_handle) 691acpi_status acpi_os_create_lock(acpi_spinlock * handle)
692{ 692{
693 spinlock_t *lock_ptr; 693 spin_lock_init(*handle);
694
695
696 lock_ptr = acpi_os_allocate(sizeof(spinlock_t));
697
698 spin_lock_init(lock_ptr);
699
700 ACPI_DEBUG_PRINT((ACPI_DB_MUTEX, "Creating spinlock[%p].\n", lock_ptr));
701
702 *out_handle = lock_ptr;
703 694
704 return AE_OK; 695 return AE_OK;
705} 696}
@@ -707,13 +698,8 @@ acpi_status acpi_os_create_lock(acpi_handle * out_handle)
707/* 698/*
708 * Deallocate the memory for a spinlock. 699 * Deallocate the memory for a spinlock.
709 */ 700 */
710void acpi_os_delete_lock(acpi_handle handle) 701void acpi_os_delete_lock(acpi_spinlock handle)
711{ 702{
712
713 ACPI_DEBUG_PRINT((ACPI_DB_MUTEX, "Deleting spinlock[%p].\n", handle));
714
715 acpi_os_free(handle);
716
717 return; 703 return;
718} 704}
719 705
@@ -1037,10 +1023,10 @@ EXPORT_SYMBOL(max_cstate);
1037 * handle is a pointer to the spinlock_t. 1023 * handle is a pointer to the spinlock_t.
1038 */ 1024 */
1039 1025
1040acpi_cpu_flags acpi_os_acquire_lock(acpi_handle handle) 1026acpi_cpu_flags acpi_os_acquire_lock(acpi_spinlock lockp)
1041{ 1027{
1042 acpi_cpu_flags flags; 1028 acpi_cpu_flags flags;
1043 spin_lock_irqsave((spinlock_t *) handle, flags); 1029 spin_lock_irqsave(lockp, flags);
1044 return flags; 1030 return flags;
1045} 1031}
1046 1032
@@ -1048,9 +1034,9 @@ acpi_cpu_flags acpi_os_acquire_lock(acpi_handle handle)
1048 * Release a spinlock. See above. 1034 * Release a spinlock. See above.
1049 */ 1035 */
1050 1036
1051void acpi_os_release_lock(acpi_handle handle, acpi_cpu_flags flags) 1037void acpi_os_release_lock(acpi_spinlock lockp, acpi_cpu_flags flags)
1052{ 1038{
1053 spin_unlock_irqrestore((spinlock_t *) handle, flags); 1039 spin_unlock_irqrestore(lockp, flags);
1054} 1040}
1055 1041
1056#ifndef ACPI_USE_LOCAL_CACHE 1042#ifndef ACPI_USE_LOCAL_CACHE