]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
Input: iqs7222 - avoid enabling unused interrupts
authorJeff LaBundy <jeff@labundy.com>
Mon, 18 Aug 2025 00:20:22 +0000 (19:20 -0500)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Thu, 4 Sep 2025 12:26:09 +0000 (05:26 -0700)
If a proximity event node is defined so as to specify the wake-up
properties of the touch surface, the proximity event interrupt is
enabled unconditionally. This may result in unwanted interrupts.

Solve this problem by enabling the interrupt only if the event is
mapped to a key or switch code.

Signed-off-by: Jeff LaBundy <jeff@labundy.com>
Link: https://lore.kernel.org/r/aKJxxgEWpNaNcUaW@nixie71
Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/misc/iqs7222.c

index 6fac31c0d99f2bf8f051c2bd590c6df7aeb109d0..ff23219a582ab8bb48c1bf17c9339b1401e7fc28 100644 (file)
@@ -2427,6 +2427,9 @@ static int iqs7222_parse_chan(struct iqs7222_private *iqs7222,
                if (error)
                        return error;
 
+               if (!iqs7222->kp_type[chan_index][i])
+                       continue;
+
                if (!dev_desc->event_offset)
                        continue;