summaryrefslogtreecommitdiffstats
path: root/drivers/input/mouse/cyapa_gen5.c
diff options
context:
space:
mode:
authorAndrzej Pietrasiewicz <andrzej.p@collabora.com>2020-10-05 06:16:07 +0200
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2020-12-03 07:10:33 +0100
commitd69f0a43c677e8afc67a222e1e7b51b9acc69cd3 (patch)
tree1b03a8d3ed76cb507f344c85cd0d0c474e6b7fa3 /drivers/input/mouse/cyapa_gen5.c
parentInput: add input_device_enabled() (diff)
downloadlinux-d69f0a43c677e8afc67a222e1e7b51b9acc69cd3.tar.xz
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/mouse/cyapa_gen5.c')
-rw-r--r--drivers/input/mouse/cyapa_gen5.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/input/mouse/cyapa_gen5.c b/drivers/input/mouse/cyapa_gen5.c
index 5c37af994b5b..abf42f77b4c5 100644
--- a/drivers/input/mouse/cyapa_gen5.c
+++ b/drivers/input/mouse/cyapa_gen5.c
@@ -518,7 +518,8 @@ int cyapa_empty_pip_output_data(struct cyapa *cyapa,
*len = length;
/* Response found, success. */
return 0;
- } else if (cyapa->operational && input && input->users &&
+ } else if (cyapa->operational &&
+ input && input_device_enabled(input) &&
(pm_stage == CYAPA_PM_RUNTIME_RESUME ||
pm_stage == CYAPA_PM_RUNTIME_SUSPEND)) {
/* Parse the data and report it if it's valid. */