mirror of https://gitee.com/openkylin/linux.git
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>
This commit is contained in:
parent
a54aecbd3a
commit
ef30a40646
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue