Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965112AbbFJQE5 (ORCPT ); Wed, 10 Jun 2015 12:04:57 -0400 Received: from ip4-83-240-67-251.cust.nbox.cz ([83.240.67.251]:36028 "EHLO ip4-83-240-18-248.cust.nbox.cz" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S933800AbbFJP1m (ORCPT ); Wed, 10 Jun 2015 11:27:42 -0400 From: Jiri Slaby To: stable@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Tomeu Vizoso , Dmitry Torokhov , Jiri Slaby Subject: [PATCH 3.12 015/111] Input: cros_ec_keyb - fix clearing keyboard state on wakeup Date: Wed, 10 Jun 2015 17:26:04 +0200 Message-Id: <8452773259cd552c289fa422209bcc12d59270e6.1433943052.git.jslaby@suse.cz> X-Mailer: git-send-email 2.4.2 In-Reply-To: <93091169a673f49c2574cddf1ef858cf0704f646.1433943052.git.jslaby@suse.cz> References: <93091169a673f49c2574cddf1ef858cf0704f646.1433943052.git.jslaby@suse.cz> In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1604 Lines: 43 From: Tomeu Vizoso 3.12-stable review patch. If anyone has any objections, please let me know. =============== commit ef30a406468a3eae007210ae0dc5ed8d5eb59b7d upstream. As the comment right before explains, the keyboard state is to be cleared only if the EC wasn't a wakeup source in the last suspend. Without this commit, there's an unneeded delay when resuming from suspend and we also lose the key that was pressed while suspended. Signed-off-by: Tomeu Vizoso Reviewed-by: Javier Martinez Canillas Signed-off-by: Dmitry Torokhov Signed-off-by: Jiri Slaby --- drivers/input/keyboard/cros_ec_keyb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/input/keyboard/cros_ec_keyb.c b/drivers/input/keyboard/cros_ec_keyb.c index 7e8b0a52af25..528de9cdf075 100644 --- a/drivers/input/keyboard/cros_ec_keyb.c +++ b/drivers/input/keyboard/cros_ec_keyb.c @@ -309,7 +309,7 @@ static int cros_ec_keyb_resume(struct device *dev) * wake source (e.g. the lid is open and the user might press a key to * wake) then the key scan buffer should be preserved. */ - if (ckdev->ec->was_wake_device) + if (!ckdev->ec->was_wake_device) cros_ec_keyb_clear_keyboard(ckdev); return 0; -- 2.4.2 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/