Skip to content

Commit

Permalink
Input: cros_ec_keyb - fix clearing keyboard state on wakeup
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-by: Javier Martinez Canillas <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
  • Loading branch information
tomeuv authored and dtor committed Apr 6, 2015
1 parent a54aecb commit ef30a40
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/input/keyboard/cros_ec_keyb.c
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,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;
Expand Down

0 comments on commit ef30a40

Please sign in to comment.