summaryrefslogtreecommitdiff
path: root/drivers/input/misc/drv2667.c
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2020-12-28 17:20:00 +0300
committerMark Brown <broonie@kernel.org>2020-12-28 17:20:00 +0300
commit2ae6f64ce1ce304b502461fdfe0b96c8171ae2cc (patch)
tree88e987c447daf2c29e2d4c15e58d1029b0cc78c2 /drivers/input/misc/drv2667.c
parent3b66e4a8e58a85af3212c7117d7a29c9ef6679a2 (diff)
parent5c8fe583cce542aa0b84adc939ce85293de36e5e (diff)
downloadlinux-2ae6f64ce1ce304b502461fdfe0b96c8171ae2cc.tar.xz
Merge tag 'v5.11-rc1' into regulator-5.11
Linux 5.11-rc1
Diffstat (limited to 'drivers/input/misc/drv2667.c')
-rw-r--r--drivers/input/misc/drv2667.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/drivers/input/misc/drv2667.c b/drivers/input/misc/drv2667.c
index bb9d5784df17..3f67b9b010bf 100644
--- a/drivers/input/misc/drv2667.c
+++ b/drivers/input/misc/drv2667.c
@@ -90,12 +90,14 @@
/**
* struct drv2667_data -
- * @input_dev - Pointer to the input device
- * @client - Pointer to the I2C client
- * @regmap - Register map of the device
- * @work - Work item used to off load the enable/disable of the vibration
- * @regulator - Pointer to the regulator for the IC
- * @magnitude - Magnitude of the vibration event
+ * @input_dev: Pointer to the input device
+ * @client: Pointer to the I2C client
+ * @regmap: Register map of the device
+ * @work: Work item used to off load the enable/disable of the vibration
+ * @regulator: Pointer to the regulator for the IC
+ * @page: Page number
+ * @magnitude: Magnitude of the vibration event
+ * @frequency: Frequency of the vibration event
**/
struct drv2667_data {
struct input_dev *input_dev;
@@ -405,7 +407,7 @@ static int __maybe_unused drv2667_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, DRV2667_CTRL_2,
DRV2667_STANDBY, DRV2667_STANDBY);
if (ret) {
@@ -434,7 +436,7 @@ static int __maybe_unused drv2667_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");