diff options
author | Alexey Starikovskiy <alexey.y.starikovskiy@intel.com> | 2006-12-07 10:42:17 -0500 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2006-12-08 02:56:07 -0500 |
commit | 523953b41e52952347d7d50dcc4bfc27bc001dc8 (patch) | |
tree | 655fd4ac231a8502651cbb216886d5f3ac404ba0 /drivers/acpi/ec.c | |
parent | 50c1e1138cb94f6aca0f8555777edbcefe0324e2 (diff) |
ACPI: ec: Acquire Global Lock under EC mutex.
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/ec.c')
-rw-r--r-- | drivers/acpi/ec.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c index 8ef74e7b3b91..4d17777110ed 100644 --- a/drivers/acpi/ec.c +++ b/drivers/acpi/ec.c | |||
@@ -286,12 +286,12 @@ static int acpi_ec_transaction(struct acpi_ec *ec, u8 command, | |||
286 | if (rdata) | 286 | if (rdata) |
287 | memset(rdata, 0, rdata_len); | 287 | memset(rdata, 0, rdata_len); |
288 | 288 | ||
289 | mutex_lock(&ec->lock); | ||
289 | if (ec->global_lock) { | 290 | if (ec->global_lock) { |
290 | status = acpi_acquire_global_lock(ACPI_EC_UDELAY_GLK, &glk); | 291 | status = acpi_acquire_global_lock(ACPI_EC_UDELAY_GLK, &glk); |
291 | if (ACPI_FAILURE(status)) | 292 | if (ACPI_FAILURE(status)) |
292 | return -ENODEV; | 293 | return -ENODEV; |
293 | } | 294 | } |
294 | mutex_lock(&ec->lock); | ||
295 | 295 | ||
296 | /* Make sure GPE is enabled before doing transaction */ | 296 | /* Make sure GPE is enabled before doing transaction */ |
297 | acpi_enable_gpe(NULL, ec->gpe, ACPI_NOT_ISR); | 297 | acpi_enable_gpe(NULL, ec->gpe, ACPI_NOT_ISR); |
@@ -307,10 +307,10 @@ static int acpi_ec_transaction(struct acpi_ec *ec, u8 command, | |||
307 | rdata, rdata_len); | 307 | rdata, rdata_len); |
308 | 308 | ||
309 | end: | 309 | end: |
310 | mutex_unlock(&ec->lock); | ||
311 | 310 | ||
312 | if (ec->global_lock) | 311 | if (ec->global_lock) |
313 | acpi_release_global_lock(glk); | 312 | acpi_release_global_lock(glk); |
313 | mutex_unlock(&ec->lock); | ||
314 | 314 | ||
315 | return status; | 315 | return status; |
316 | } | 316 | } |