]> git.baikalelectronics.ru Git - kernel.git/commit
Input: iqs7222 - correct slider event disable logic
authorJeff LaBundy <jeff@labundy.com>
Mon, 27 Jun 2022 22:13:49 +0000 (15:13 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Mon, 27 Jun 2022 22:25:50 +0000 (15:25 -0700)
commite6ccbee8a4a16032237d9a82daf2b523f810d26e
treed197c8900b7633fc78b0ef541a02625912e5da21
parentde30749e36b3d9d97a2d92df90a8249c88b5d0e1
Input: iqs7222 - correct slider event disable logic

If a positive swipe/flick gesture is defined but the corresponding
negative gesture is not, the former is inadvertently disabled. Fix
this by gently refactoring the logic responsible for disabling all
gestures by default.

As part of this change, make the code a bit simpler by eliminating
a superfluous conditional check. If a slider event does not define
an enable control, the second term of the bitwise AND operation is
simply 0xFFFF.

Fixes: a8b0abcc88cc ("Input: add support for Azoteq IQS7222A/B/C")
Signed-off-by: Jeff LaBundy <jeff@labundy.com>
Link: https://lore.kernel.org/r/20220626072412.475211-2-jeff@labundy.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/misc/iqs7222.c