summaryrefslogtreecommitdiff
path: root/drivers/input/keyboard/st-keyscan.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/input/keyboard/st-keyscan.c')
-rw-r--r--drivers/input/keyboard/st-keyscan.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/input/keyboard/st-keyscan.c b/drivers/input/keyboard/st-keyscan.c
index 27562cd67fb6..a045d61165ac 100644
--- a/drivers/input/keyboard/st-keyscan.c
+++ b/drivers/input/keyboard/st-keyscan.c
@@ -221,7 +221,7 @@ static int keyscan_suspend(struct device *dev)
if (device_may_wakeup(dev))
enable_irq_wake(keypad->irq);
- else if (input->users)
+ else if (input_device_enabled(input))
keyscan_stop(keypad);
mutex_unlock(&input->mutex);
@@ -239,7 +239,7 @@ static int keyscan_resume(struct device *dev)
if (device_may_wakeup(dev))
disable_irq_wake(keypad->irq);
- else if (input->users)
+ else if (input_device_enabled(input))
retval = keyscan_start(keypad);
mutex_unlock(&input->mutex);