Re: [PATCH v2] input: don't call input_dev_release_keys() in resume

From
Oskar Andero <hidden>
Date
2013-09-18 09:20:14
Also in
lkml
Reply to
Oskar Andero, 2013-07-25
Hii Dmitry,

On 14:09 Thu 25 Jul     , Oskar Andero wrote:
quoted hunk ↗ jump to hunk
From: Aleksej Makarov <redacted>

When waking up the platform by pressing a specific key, sending a
release on that key makes it impossible to react on the event in
user-space. This is fixed by moving the input_reset_device() call to
resume instead.

Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Reviewed-by: Radovan Lekanovic <redacted>
Signed-off-by: Aleksej Makarov <redacted>
Signed-off-by: Oskar Andero <redacted>
---
 drivers/input/input.c | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)
diff --git a/drivers/input/input.c b/drivers/input/input.c
index c044699..ee3ff16 100644
--- a/drivers/input/input.c
+++ b/drivers/input/input.c
@@ -1676,22 +1676,13 @@ static int input_dev_suspend(struct device *dev)
 {
 	struct input_dev *input_dev = to_input_dev(dev);
 
-	mutex_lock(&input_dev->mutex);
-
-	if (input_dev->users)
-		input_dev_toggle(input_dev, false);
-
-	mutex_unlock(&input_dev->mutex);
+	input_reset_device(input_dev);
 
 	return 0;
 }
 
 static int input_dev_resume(struct device *dev)
 {
-	struct input_dev *input_dev = to_input_dev(dev);
-
-	input_reset_device(input_dev);
-
 	return 0;
 }
Sorry for bugging you with this patch again! I realize that changes to
input.c is sensitive since it's a central part of the subsystem.
However, the problem of reading input events after wake-up remains.

Does the patch make sense or do you see any potential risks with it?

Thanks,
 Oskar
Thread (2 messages) 2 messages, 1 author, last reply 2013-09-18
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help