diff options
author | Tomeu Vizoso <tomeu.vizoso@collabora.com> | 2015-04-06 19:44:59 +0300 |
---|---|---|
committer | Jiri Slaby <jslaby@suse.cz> | 2015-05-26 17:26:57 +0300 |
commit | 8452773259cd552c289fa422209bcc12d59270e6 (patch) | |
tree | b73b54d665e74b5078015b01845dec44bddd59ce /drivers/input | |
parent | 58afd668e242b6af089940d1b85eeb2be59fa691 (diff) | |
download | linux-8452773259cd552c289fa422209bcc12d59270e6.tar.xz |
Input: cros_ec_keyb - fix clearing keyboard state on wakeup
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 <tomeu.vizoso@collabora.com>
Reviewed-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Diffstat (limited to 'drivers/input')
-rw-r--r-- | drivers/input/keyboard/cros_ec_keyb.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; |