From: Greg Kroah-Hartman Date: Sun, 14 Dec 2014 20:04:52 +0000 (-0800) Subject: Revert: ACPI / EC: Add support to disallow QR_EC to be issued before completing previ... X-Git-Tag: v3.17.7~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1c9e23ba8ed175ebe9a48366a276bc3ac493506c;p=thirdparty%2Fkernel%2Fstable.git 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 --- diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c index cf79c4cdf9552..c874859b45657 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;