Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=523953b41e52952347d7d50dcc4bfc27bc001dc8
Commit:     523953b41e52952347d7d50dcc4bfc27bc001dc8
Parent:     50c1e1138cb94f6aca0f8555777edbcefe0324e2
Author:     Alexey Starikovskiy <[EMAIL PROTECTED]>
AuthorDate: Thu Dec 7 18:42:17 2006 +0300
Committer:  Len Brown <[EMAIL PROTECTED]>
CommitDate: Fri Dec 8 02:56:07 2006 -0500

    ACPI: ec: Acquire Global Lock under EC mutex.
    
    Signed-off-by: Len Brown <[EMAIL PROTECTED]>
---
 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 8ef74e7..4d17777 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,
         if (rdata)
                 memset(rdata, 0, rdata_len);
 
+       mutex_lock(&ec->lock);
        if (ec->global_lock) {
                status = acpi_acquire_global_lock(ACPI_EC_UDELAY_GLK, &glk);
                if (ACPI_FAILURE(status))
                        return -ENODEV;
        }
-       mutex_lock(&ec->lock);
 
        /* Make sure GPE is enabled before doing transaction */
        acpi_enable_gpe(NULL, ec->gpe, ACPI_NOT_ISR);
@@ -307,10 +307,10 @@ static int acpi_ec_transaction(struct acpi_ec *ec, u8 
command,
                                               rdata, rdata_len);
 
 end:
-       mutex_unlock(&ec->lock);
 
        if (ec->global_lock)
                acpi_release_global_lock(glk);
+       mutex_unlock(&ec->lock);
 
        return status;
 }
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to