提交 ef30a406 编写于 作者: T Tomeu Vizoso 提交者: Dmitry Torokhov

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: NTomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: NJavier Martinez Canillas <javier.martinez@collabora.co.uk>
Signed-off-by: NDmitry Torokhov <dmitry.torokhov@gmail.com>
上级 a54aecbd
...@@ -338,7 +338,7 @@ static int cros_ec_keyb_resume(struct device *dev) ...@@ -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 source (e.g. the lid is open and the user might press a key to
* wake) then the key scan buffer should be preserved. * 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); cros_ec_keyb_clear_keyboard(ckdev);
return 0; return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册