diff options
author | Tomeu Vizoso <tomeu.vizoso@collabora.com> | 2015-04-06 12:44:59 -0400 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2015-04-06 13:01:20 -0400 |
commit | ef30a406468a3eae007210ae0dc5ed8d5eb59b7d (patch) | |
tree | a8b7ee66e237ebe80dd3628a1021cf400d061d15 /drivers/input | |
parent | a54aecbd3ad08f6a5e9546a3602af7d88cc5a613 (diff) |
Input: cros_ec_keyb - fix clearing keyboard state on wakeup
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>
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 ffa989f2c785..64b9b59ad4cb 100644 --- a/drivers/input/keyboard/cros_ec_keyb.c +++ b/drivers/input/keyboard/cros_ec_keyb.c | |||
@@ -338,7 +338,7 @@ static int cros_ec_keyb_resume(struct device *dev) | |||
338 | * wake source (e.g. the lid is open and the user might press a key to | 338 | * wake source (e.g. the lid is open and the user might press a key to |
339 | * wake) then the key scan buffer should be preserved. | 339 | * wake) then the key scan buffer should be preserved. |
340 | */ | 340 | */ |
341 | if (ckdev->ec->was_wake_device) | 341 | if (!ckdev->ec->was_wake_device) |
342 | cros_ec_keyb_clear_keyboard(ckdev); | 342 | cros_ec_keyb_clear_keyboard(ckdev); |
343 | 343 | ||
344 | return 0; | 344 | return 0; |