aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/ec.c
diff options
context:
space:
mode:
authorAlexey Starikovskiy <alexey.y.starikovskiy@intel.com>2006-12-07 18:42:16 +0300
committerLen Brown <len.brown@intel.com>2006-12-08 02:56:07 -0500
commitc787a8551e7fee85366962881e7a4f2fda656dfc (patch)
tree0999285bf3e56f76b04856ba70d8c8cdda553164 /drivers/acpi/ec.c
parent5d0c288b7362ad7ee235b59352ac2a89480e4757 (diff)
downloadkernel_samsung_crespo-c787a8551e7fee85366962881e7a4f2fda656dfc.zip
kernel_samsung_crespo-c787a8551e7fee85366962881e7a4f2fda656dfc.tar.gz
kernel_samsung_crespo-c787a8551e7fee85366962881e7a4f2fda656dfc.tar.bz2
ACPI: ec: Change semaphore to mutex.
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/ec.c')
-rw-r--r--drivers/acpi/ec.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c
index a85f795..034a963 100644
--- a/drivers/acpi/ec.c
+++ b/drivers/acpi/ec.c
@@ -103,7 +103,7 @@ struct acpi_ec {
unsigned long command_addr;
unsigned long data_addr;
unsigned long global_lock;
- struct semaphore sem;
+ struct mutex lock;
atomic_t query_pending;
atomic_t leaving_burst; /* 0 : No, 1 : Yes, 2: abort */
wait_queue_head_t wait;
@@ -294,7 +294,7 @@ static int acpi_ec_transaction(struct acpi_ec *ec, u8 command,
if (ACPI_FAILURE(status))
return -ENODEV;
}
- down(&ec->sem);
+ mutex_lock(&ec->lock);
/* Make sure GPE is enabled before doing transaction */
acpi_enable_gpe(NULL, ec->gpe_bit, ACPI_NOT_ISR);
@@ -310,7 +310,7 @@ static int acpi_ec_transaction(struct acpi_ec *ec, u8 command,
rdata, rdata_len);
end:
- up(&ec->sem);
+ mutex_unlock(&ec->lock);
if (ec->global_lock)
acpi_release_global_lock(glk);
@@ -647,7 +647,7 @@ static int acpi_ec_add(struct acpi_device *device)
ec->handle = device->handle;
ec->uid = -1;
- init_MUTEX(&ec->sem);
+ mutex_init(&ec->lock);
atomic_set(&ec->query_pending, 0);
if (acpi_ec_mode == EC_INTR) {
atomic_set(&ec->leaving_burst, 1);
@@ -830,7 +830,7 @@ acpi_fake_ecdt_callback(acpi_handle handle,
{
acpi_status status;
- init_MUTEX(&ec_ecdt->sem);
+ mutex_init(&ec_ecdt->lock);
if (acpi_ec_mode == EC_INTR) {
init_waitqueue_head(&ec_ecdt->wait);
}
@@ -915,7 +915,7 @@ static int __init acpi_ec_get_real_ecdt(void)
return -ENOMEM;
memset(ec_ecdt, 0, sizeof(struct acpi_ec));
- init_MUTEX(&ec_ecdt->sem);
+ mutex_init(&ec_ecdt->lock);
if (acpi_ec_mode == EC_INTR) {
init_waitqueue_head(&ec_ecdt->wait);
}