Input: iqs7222 - avoid enabling unused interrupts

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>

authored by Jeff LaBundy and committed by Dmitry Torokhov c9ddc41c 47ddf62b

+3
+3
drivers/input/misc/iqs7222.c
··· 2427 2427 if (error) 2428 2428 return error; 2429 2429 2430 + if (!iqs7222->kp_type[chan_index][i]) 2431 + continue; 2432 + 2430 2433 if (!dev_desc->event_offset) 2431 2434 continue; 2432 2435