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
@@ -965,7 +965,7 @@ static int __maybe_unused gpio_keys_suspend(struct device *dev)
|
||||
return error;
|
||||
} else {
|
||||
mutex_lock(&input->mutex);
|
||||
if (input->users)
|
||||
if (input_device_enabled(input))
|
||||
gpio_keys_close(input);
|
||||
mutex_unlock(&input->mutex);
|
||||
}
|
||||
@@ -983,7 +983,7 @@ static int __maybe_unused gpio_keys_resume(struct device *dev)
|
||||
gpio_keys_disable_wakeup(ddata);
|
||||
} else {
|
||||
mutex_lock(&input->mutex);
|
||||
if (input->users)
|
||||
if (input_device_enabled(input))
|
||||
error = gpio_keys_open(input);
|
||||
mutex_unlock(&input->mutex);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user