From: Aleksej Makarov <aleksej.maka...@sonymobile.com>

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.torok...@gmail.com>
Reviewed-by: Radovan Lekanovic <radovan.lekano...@sonymobile.com>
Signed-off-by: Aleksej Makarov <aleksej.maka...@sonymobile.com>
Signed-off-by: Oskar Andero <oskar.and...@sonymobile.com>
---
 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;
 }
 
-- 
1.8.1.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to