Skip to content

Commit

Permalink
Input: synaptics - replace NOOP with suitable commentary
Browse files Browse the repository at this point in the history
Fixes the following W=1 kernel build warning(s):

 drivers/input/mouse/synaptics.c: In function ‘synaptics_process_packet’:
 drivers/input/mouse/synaptics.c:1110:6: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body]

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Link: https://lore.kernel.org/r/20210114152323.2382283-2-lee.jones@linaro.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
  • Loading branch information
Lee Jones authored and Dmitry Torokhov committed Jan 20, 2021
1 parent 2f6aa61 commit a1ba9c2
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions drivers/input/mouse/synaptics.c
Original file line number Diff line number Diff line change
Expand Up @@ -1106,8 +1106,11 @@ static void synaptics_process_packet(struct psmouse *psmouse)
num_fingers = hw.w + 2;
break;
case 2:
if (SYN_MODEL_PEN(info->model_id))
; /* Nothing, treat a pen as a single finger */
/*
* SYN_MODEL_PEN(info->model_id): even if
* the device supports pen, we treat it as
* a single finger.
*/
break;
case 4 ... 15:
if (SYN_CAP_PALMDETECT(info->capabilities))
Expand Down

0 comments on commit a1ba9c2

Please sign in to comment.