aboutsummaryrefslogtreecommitdiff
path: root/drivers/input/keyboard/lpc32xx-keys.c
diff options
context:
space:
mode:
authorGravatar Andrzej Pietrasiewicz <andrzej.p@collabora.com> 2020-10-04 21:16:07 -0700
committerGravatar Dmitry Torokhov <dmitry.torokhov@gmail.com> 2020-12-02 22:10:33 -0800
commitd69f0a43c677e8afc67a222e1e7b51b9acc69cd3 (patch)
tree1b03a8d3ed76cb507f344c85cd0d0c474e6b7fa3 /drivers/input/keyboard/lpc32xx-keys.c
parentInput: add input_device_enabled() (diff)
downloadlinux-d69f0a43c677e8afc67a222e1e7b51b9acc69cd3.tar.gz
linux-d69f0a43c677e8afc67a222e1e7b51b9acc69cd3.tar.bz2
linux-d69f0a43c677e8afc67a222e1e7b51b9acc69cd3.zip
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/lpc32xx-keys.c')
-rw-r--r--drivers/input/keyboard/lpc32xx-keys.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/input/keyboard/lpc32xx-keys.c b/drivers/input/keyboard/lpc32xx-keys.c
index 348af2aeb5de..943aeeb0de79 100644
--- a/drivers/input/keyboard/lpc32xx-keys.c
+++ b/drivers/input/keyboard/lpc32xx-keys.c
@@ -273,7 +273,7 @@ static int lpc32xx_kscan_suspend(struct device *dev)
mutex_lock(&input->mutex);
- if (input->users) {
+ if (input_device_enabled(input)) {
/* Clear IRQ and disable clock */
writel(1, LPC32XX_KS_IRQ(kscandat->kscan_base));
clk_disable_unprepare(kscandat->clk);
@@ -292,7 +292,7 @@ static int lpc32xx_kscan_resume(struct device *dev)
mutex_lock(&input->mutex);
- if (input->users) {
+ if (input_device_enabled(input)) {
/* Enable clock and clear IRQ */
retval = clk_prepare_enable(kscandat->clk);
if (retval == 0)