aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi
diff options
context:
space:
mode:
authorLin Ming <ming.m.lin@intel.com>2011-03-23 05:26:34 -0400
committerLen Brown <len.brown@intel.com>2011-03-25 04:32:33 -0400
commit9f63b88bd7a1ac1afbb4358772a39abaeddbdd13 (patch)
tree1b95ed2997b6a02305add78f20805fee5b3fb269 /drivers/acpi
parentd8d75b0ee6dbd65c8a2189aef50a03667d81c937 (diff)
ACPI: osl, add acpi_os_create_lock interface
Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi')
-rw-r--r--drivers/acpi/osl.c33
1 files changed, 25 insertions, 8 deletions
diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c
index c90c76aa7f8b..cf750a7a9523 100644
--- a/drivers/acpi/osl.c
+++ b/drivers/acpi/osl.c
@@ -883,14 +883,6 @@ void acpi_os_wait_events_complete(void *context)
883 883
884EXPORT_SYMBOL(acpi_os_wait_events_complete); 884EXPORT_SYMBOL(acpi_os_wait_events_complete);
885 885
886/*
887 * Deallocate the memory for a spinlock.
888 */
889void acpi_os_delete_lock(acpi_spinlock handle)
890{
891 return;
892}
893
894acpi_status 886acpi_status
895acpi_os_create_semaphore(u32 max_units, u32 initial_units, acpi_handle * handle) 887acpi_os_create_semaphore(u32 max_units, u32 initial_units, acpi_handle * handle)
896{ 888{
@@ -1322,6 +1314,31 @@ int acpi_resources_are_enforced(void)
1322EXPORT_SYMBOL(acpi_resources_are_enforced); 1314EXPORT_SYMBOL(acpi_resources_are_enforced);
1323 1315
1324/* 1316/*
1317 * Create and initialize a spinlock.
1318 */
1319acpi_status
1320acpi_os_create_lock(acpi_spinlock *out_handle)
1321{
1322 spinlock_t *lock;
1323
1324 lock = ACPI_ALLOCATE(sizeof(spinlock_t));
1325 if (!lock)
1326 return AE_NO_MEMORY;
1327 spin_lock_init(lock);
1328 *out_handle = lock;
1329
1330 return AE_OK;
1331}
1332
1333/*
1334 * Deallocate the memory for a spinlock.
1335 */
1336void acpi_os_delete_lock(acpi_spinlock handle)
1337{
1338 ACPI_FREE(handle);
1339}
1340
1341/*
1325 * Acquire a spinlock. 1342 * Acquire a spinlock.
1326 * 1343 *
1327 * handle is a pointer to the spinlock_t. 1344 * handle is a pointer to the spinlock_t.