diff options
author | Andrzej Pietrasiewicz <andrzej.p@collabora.com> | 2020-10-04 21:16:07 -0700 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2020-12-02 22:10:33 -0800 |
commit | d69f0a43c677e8afc67a222e1e7b51b9acc69cd3 (patch) | |
tree | 1b03a8d3ed76cb507f344c85cd0d0c474e6b7fa3 /drivers/input/mouse/cyapa_gen3.c | |
parent | 39be39ceffd572baddfeff8b50aba931d3d6d785 (diff) | |
download | linux-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/mouse/cyapa_gen3.c')
-rw-r--r-- | drivers/input/mouse/cyapa_gen3.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/input/mouse/cyapa_gen3.c b/drivers/input/mouse/cyapa_gen3.c index a0361f9325f8..a97f4acb6452 100644 --- a/drivers/input/mouse/cyapa_gen3.c +++ b/drivers/input/mouse/cyapa_gen3.c @@ -952,7 +952,8 @@ static int cyapa_gen3_set_power_mode(struct cyapa *cyapa, u8 power_mode, * doing so before issuing the next command may result in errors * depending on the command's content. */ - if (cyapa->operational && input && input->users && + if (cyapa->operational && + input && input_device_enabled(input) && (pm_stage == CYAPA_PM_RUNTIME_SUSPEND || pm_stage == CYAPA_PM_RUNTIME_RESUME)) { /* Try to polling in 120Hz, read may fail, just ignore it. */ |