summaryrefslogtreecommitdiffstats
path: root/drivers/input/misc/drv260x.c
diff options
context:
space:
mode:
authorAndrzej Pietrasiewicz <andrzej.p@collabora.com>2020-10-04 21:16:07 -0700
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2020-12-02 22:10:33 -0800
commitd69f0a43c677e8afc67a222e1e7b51b9acc69cd3 (patch)
tree1b03a8d3ed76cb507f344c85cd0d0c474e6b7fa3 /drivers/input/misc/drv260x.c
parent39be39ceffd572baddfeff8b50aba931d3d6d785 (diff)
downloadlinux-stable-d69f0a43c677e8afc67a222e1e7b51b9acc69cd3.tar.gz
linux-stable-d69f0a43c677e8afc67a222e1e7b51b9acc69cd3.tar.bz2
linux-stable-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/misc/drv260x.c')
-rw-r--r--drivers/input/misc/drv260x.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/input/misc/drv260x.c b/drivers/input/misc/drv260x.c
index cc51de7759a0..0efe56f49aa9 100644
--- a/drivers/input/misc/drv260x.c
+++ b/drivers/input/misc/drv260x.c
@@ -580,7 +580,7 @@ static int __maybe_unused drv260x_suspend(struct device *dev)
mutex_lock(&haptics->input_dev->mutex);
- if (haptics->input_dev->users) {
+ if (input_device_enabled(haptics->input_dev)) {
ret = regmap_update_bits(haptics->regmap,
DRV260X_MODE,
DRV260X_STANDBY_MASK,
@@ -612,7 +612,7 @@ static int __maybe_unused drv260x_resume(struct device *dev)
mutex_lock(&haptics->input_dev->mutex);
- if (haptics->input_dev->users) {
+ if (input_device_enabled(haptics->input_dev)) {
ret = regulator_enable(haptics->regulator);
if (ret) {
dev_err(dev, "Failed to enable regulator\n");