Input: use input_device_enabled()
Use the newly added helper in relevant input drivers. Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@collabora.com> Link: https://lore.kernel.org/r/20200608112211.12125-3-andrzej.p@collabora.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
This commit is contained in:
committed by
Dmitry Torokhov
parent
39be39ceff
commit
d69f0a43c6
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user