From 1c9e23ba8ed175ebe9a48366a276bc3ac493506c Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Sun, 14 Dec 2014 12:04:52 -0800 Subject: Revert: ACPI / EC: Add support to disallow QR_EC to be issued before completing previous QR_EC 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 Cc: Alexander Mezin Cc: Rafael J. Wysocki Signed-off-by: Greg Kroah-Hartman --- drivers/acpi/ec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c index cf79c4cdf955..c874859b4565 100644 --- a/drivers/acpi/ec.c +++ b/drivers/acpi/ec.c @@ -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; -- cgit v1.2.3