diff options
author | Alexey Starikovskiy <alexey.y.starikovskiy@intel.com> | 2006-12-07 10:42:16 -0500 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2006-12-08 02:56:07 -0500 |
commit | c787a8551e7fee85366962881e7a4f2fda656dfc (patch) | |
tree | 0999285bf3e56f76b04856ba70d8c8cdda553164 /drivers/acpi/ec.c | |
parent | 5d0c288b7362ad7ee235b59352ac2a89480e4757 (diff) |
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.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c index a85f795ab4e..034a9637235 100644 --- a/drivers/acpi/ec.c +++ b/drivers/acpi/ec.c | |||
@@ -103,7 +103,7 @@ struct acpi_ec { | |||
103 | unsigned long command_addr; | 103 | unsigned long command_addr; |
104 | unsigned long data_addr; | 104 | unsigned long data_addr; |
105 | unsigned long global_lock; | 105 | unsigned long global_lock; |
106 | struct semaphore sem; | 106 | struct mutex lock; |
107 | atomic_t query_pending; | 107 | atomic_t query_pending; |
108 | atomic_t leaving_burst; /* 0 : No, 1 : Yes, 2: abort */ | 108 | atomic_t leaving_burst; /* 0 : No, 1 : Yes, 2: abort */ |
109 | wait_queue_head_t wait; | 109 | wait_queue_head_t wait; |
@@ -294,7 +294,7 @@ static int acpi_ec_transaction(struct acpi_ec *ec, u8 command, | |||
294 | if (ACPI_FAILURE(status)) | 294 | if (ACPI_FAILURE(status)) |
295 | return -ENODEV; | 295 | return -ENODEV; |
296 | } | 296 | } |
297 | down(&ec->sem); | 297 | mutex_lock(&ec->lock); |
298 | 298 | ||
299 | /* Make sure GPE is enabled before doing transaction */ | 299 | /* Make sure GPE is enabled before doing transaction */ |
300 | acpi_enable_gpe(NULL, ec->gpe_bit, ACPI_NOT_ISR); | 300 | 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, | |||
310 | rdata, rdata_len); | 310 | rdata, rdata_len); |
311 | 311 | ||
312 | end: | 312 | end: |
313 | up(&ec->sem); | 313 | mutex_unlock(&ec->lock); |
314 | 314 | ||
315 | if (ec->global_lock) | 315 | if (ec->global_lock) |
316 | acpi_release_global_lock(glk); | 316 | acpi_release_global_lock(glk); |
@@ -647,7 +647,7 @@ static int acpi_ec_add(struct acpi_device *device) | |||
647 | 647 | ||
648 | ec->handle = device->handle; | 648 | ec->handle = device->handle; |
649 | ec->uid = -1; | 649 | ec->uid = -1; |
650 | init_MUTEX(&ec->sem); | 650 | mutex_init(&ec->lock); |
651 | atomic_set(&ec->query_pending, 0); | 651 | atomic_set(&ec->query_pending, 0); |
652 | if (acpi_ec_mode == EC_INTR) { | 652 | if (acpi_ec_mode == EC_INTR) { |
653 | atomic_set(&ec->leaving_burst, 1); | 653 | atomic_set(&ec->leaving_burst, 1); |
@@ -830,7 +830,7 @@ acpi_fake_ecdt_callback(acpi_handle handle, | |||
830 | { | 830 | { |
831 | acpi_status status; | 831 | acpi_status status; |
832 | 832 | ||
833 | init_MUTEX(&ec_ecdt->sem); | 833 | mutex_init(&ec_ecdt->lock); |
834 | if (acpi_ec_mode == EC_INTR) { | 834 | if (acpi_ec_mode == EC_INTR) { |
835 | init_waitqueue_head(&ec_ecdt->wait); | 835 | init_waitqueue_head(&ec_ecdt->wait); |
836 | } | 836 | } |
@@ -915,7 +915,7 @@ static int __init acpi_ec_get_real_ecdt(void) | |||
915 | return -ENOMEM; | 915 | return -ENOMEM; |
916 | memset(ec_ecdt, 0, sizeof(struct acpi_ec)); | 916 | memset(ec_ecdt, 0, sizeof(struct acpi_ec)); |
917 | 917 | ||
918 | init_MUTEX(&ec_ecdt->sem); | 918 | mutex_init(&ec_ecdt->lock); |
919 | if (acpi_ec_mode == EC_INTR) { | 919 | if (acpi_ec_mode == EC_INTR) { |
920 | init_waitqueue_head(&ec_ecdt->wait); | 920 | init_waitqueue_head(&ec_ecdt->wait); |
921 | } | 921 | } |