Commit 84527732 authored by Tomeu Vizoso's avatar Tomeu Vizoso Committed by Jiri Slaby

Input: cros_ec_keyb - fix clearing keyboard state on wakeup

commit ef30a406 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: default avatarTomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: default avatarJavier Martinez Canillas <javier.martinez@collabora.co.uk>
Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
parent 58afd668
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment