]> git.hungrycats.org Git - linux/commitdiff
Revert: ACPI / EC: Add support to disallow QR_EC to be issued before completing previ...
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 14 Dec 2014 20:04:52 +0000 (12:04 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 16 Dec 2014 17:37:11 +0000 (09:37 -0800)
This reverts commit 2dbfff81a40b5b2be553042ad5c767e34fdd214c, which
really is commit 558e4736f2e1b0e6323adf7a5e4df77ed6cfc1a4 upstream.

Sorry for the confusion, this got applied twice, and reverted once, this
is the second revert and I hope to never touch it again...

Reported-by: Lv Zheng <lv.zheng@intel.com>
Cc: Alexander Mezin <mezin.alexander@gmail.com>
Cc: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/acpi/ec.c

index cf79c4cdf95522dd747df9933cd2241296dc5b6e..c874859b456573d12a93bd1c7f91debcae763043 100644 (file)
@@ -299,11 +299,11 @@ static int acpi_ec_transaction_unlocked(struct acpi_ec *ec,
        /* following two actions should be kept atomic */
        ec->curr = t;
        start_transaction(ec);
-       if (ec->curr->command == ACPI_EC_COMMAND_QUERY)
-               clear_bit(EC_FLAGS_QUERY_PENDING, &ec->flags);
        spin_unlock_irqrestore(&ec->lock, tmp);
        ret = ec_poll(ec);
        spin_lock_irqsave(&ec->lock, tmp);
+       if (ec->curr->command == ACPI_EC_COMMAND_QUERY)
+               clear_bit(EC_FLAGS_QUERY_PENDING, &ec->flags);
        ec->curr = NULL;
        spin_unlock_irqrestore(&ec->lock, tmp);
        return ret;