diff options
author | Andrzej Pietrasiewicz <andrzej.p@collabora.com> | 2020-10-04 21:16:07 -0700 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2020-12-02 22:10:33 -0800 |
commit | d69f0a43c677e8afc67a222e1e7b51b9acc69cd3 (patch) | |
tree | 1b03a8d3ed76cb507f344c85cd0d0c474e6b7fa3 /drivers/input/keyboard/gpio_keys.c | |
parent | 39be39ceffd572baddfeff8b50aba931d3d6d785 (diff) | |
download | linux-d69f0a43c677e8afc67a222e1e7b51b9acc69cd3.tar.bz2 |
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>
Diffstat (limited to 'drivers/input/keyboard/gpio_keys.c')
-rw-r--r-- | drivers/input/keyboard/gpio_keys.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/input/keyboard/gpio_keys.c b/drivers/input/keyboard/gpio_keys.c index a079504e98e8..77bac4ddf324 100644 --- a/drivers/input/keyboard/gpio_keys.c +++ b/drivers/input/keyboard/gpio_keys.c @@ -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); } |