From d69f0a43c677e8afc67a222e1e7b51b9acc69cd3 Mon Sep 17 00:00:00 2001 From: Andrzej Pietrasiewicz Date: Sun, 4 Oct 2020 21:16:07 -0700 Subject: Input: use input_device_enabled() Use the newly added helper in relevant input drivers. Signed-off-by: Andrzej Pietrasiewicz Link: https://lore.kernel.org/r/20200608112211.12125-3-andrzej.p@collabora.com Signed-off-by: Dmitry Torokhov --- drivers/input/misc/drv2665.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/input/misc/drv2665.c') diff --git a/drivers/input/misc/drv2665.c b/drivers/input/misc/drv2665.c index 0e65ab180f49..21913e8085d7 100644 --- a/drivers/input/misc/drv2665.c +++ b/drivers/input/misc/drv2665.c @@ -230,7 +230,7 @@ static int __maybe_unused drv2665_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, DRV2665_CTRL_2, DRV2665_STANDBY, DRV2665_STANDBY); if (ret) { @@ -259,7 +259,7 @@ static int __maybe_unused drv2665_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"); -- cgit v1.2.3