From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753892AbbCYSpd (ORCPT ); Wed, 25 Mar 2015 14:45:33 -0400 Received: from bhuna.collabora.co.uk ([93.93.135.160]:36926 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753253AbbCYSpa (ORCPT ); Wed, 25 Mar 2015 14:45:30 -0400 Message-ID: <55130243.4000209@collabora.co.uk> Date: Wed, 25 Mar 2015 19:45:23 +0100 From: Javier Martinez Canillas User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.2.0 MIME-Version: 1.0 To: Tomeu Vizoso , linux-kernel@vger.kernel.org CC: Dmitry Torokhov , Lee Jones , Doug Anderson , Andrew Bresticker , Sjoerd Simons , Bill Richardson , Todd Broch , linux-input@vger.kernel.org Subject: Re: [PATCH v2] Input: cros_ec_keyb - Clear keyboard state only when it hasn't been a wake source References: <1427299718-22820-1-git-send-email-tomeu.vizoso@collabora.com> In-Reply-To: <1427299718-22820-1-git-send-email-tomeu.vizoso@collabora.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello Tomeu, On 03/25/2015 05:08 PM, Tomeu Vizoso wrote: > 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 > --- > > Sorry, v1 included an unintended change. > > Thanks, > > Tomeu > > --- > 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 769f8f7..b50c5b8 100644 > --- a/drivers/input/keyboard/cros_ec_keyb.c > +++ b/drivers/input/keyboard/cros_ec_keyb.c > @@ -341,7 +341,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); > Your change matches the comment indeed and makes more sense. Reviewed-by: Javier Martinez Canillas Best regards, Javier