summaryrefslogtreecommitdiff
path: root/drivers/input/input.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/input/input.c')
-rw-r--r--drivers/input/input.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/input/input.c b/drivers/input/input.c
index 880605959aa6..baaddd168804 100644
--- a/drivers/input/input.c
+++ b/drivers/input/input.c
@@ -1667,8 +1667,14 @@ void input_reset_device(struct input_dev *dev)
mutex_lock(&dev->mutex);
spin_lock_irqsave(&dev->event_lock, flags);
- input_dev_toggle(dev, true);
- input_dev_release_keys(dev);
+ /*
+ * Keys that have been pressed at suspend time are unlikely
+ * to be still pressed when we resume.
+ */
+ if (!test_bit(INPUT_PROP_NO_DUMMY_RELEASE, dev->propbit)) {
+ input_dev_toggle(dev, true);
+ input_dev_release_keys(dev);
+ }
spin_unlock_irqrestore(&dev->event_lock, flags);
mutex_unlock(&dev->mutex);