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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Aleksej Makarov <aleksej.makarov@xxxxxxxxxxxxxx>

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.

Cc: Dmitry Torokhov <dmitry.torokhov@xxxxxxxxx>
Reviewed-by: Radovan Lekanovic <radovan.lekanovic@xxxxxxxxxxxxxx>
Signed-off-by: Aleksej Makarov <aleksej.makarov@xxxxxxxxxxxxxx>
Signed-off-by: Oskar Andero <oskar.andero@xxxxxxxxxxxxxx>
---
 drivers/input/input.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/drivers/input/input.c b/drivers/input/input.c
index c044699..61ce19f 100644
--- a/drivers/input/input.c
+++ b/drivers/input/input.c
@@ -1690,7 +1690,10 @@ static int input_dev_resume(struct device *dev)
 {
 	struct input_dev *input_dev = to_input_dev(dev);
 
-	input_reset_device(input_dev);
+	mutex_lock(&input_dev->mutex);
+	if (input_dev->users)
+		input_dev_toggle(input_dev, true);
+	mutex_unlock(&input_dev->mutex);
 
 	return 0;
 }
-- 
1.7.8.6

--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux