Skip to content

Commit

Permalink
Input: ALPS - switch to using input_mt_report_finger_count
Browse files Browse the repository at this point in the history
Instead of open-coded reporting number of fingers on the touchpad
let's use input_mt_report_finger_count() helper.

Acked-by: Seth Forshee <seth.forshee@canonical.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
  • Loading branch information
Dmitry Torokhov committed May 11, 2012
1 parent 3b7e09f commit 616575c
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions drivers/input/mouse/alps.c
Original file line number Diff line number Diff line change
Expand Up @@ -553,10 +553,7 @@ static void alps_process_touchpad_packet_v3(struct psmouse *psmouse)

alps_report_semi_mt_data(dev, fingers, x1, y1, x2, y2);

input_report_key(dev, BTN_TOOL_FINGER, fingers == 1);
input_report_key(dev, BTN_TOOL_DOUBLETAP, fingers == 2);
input_report_key(dev, BTN_TOOL_TRIPLETAP, fingers == 3);
input_report_key(dev, BTN_TOOL_QUADTAP, fingers == 4);
input_mt_report_finger_count(dev, fingers);

input_report_key(dev, BTN_LEFT, left);
input_report_key(dev, BTN_RIGHT, right);
Expand Down Expand Up @@ -685,10 +682,7 @@ static void alps_process_packet_v4(struct psmouse *psmouse)

alps_report_semi_mt_data(dev, fingers, x1, y1, x2, y2);

input_report_key(dev, BTN_TOOL_FINGER, fingers == 1);
input_report_key(dev, BTN_TOOL_DOUBLETAP, fingers == 2);
input_report_key(dev, BTN_TOOL_TRIPLETAP, fingers == 3);
input_report_key(dev, BTN_TOOL_QUADTAP, fingers == 4);
input_mt_report_finger_count(dev, fingers);

input_report_key(dev, BTN_LEFT, left);
input_report_key(dev, BTN_RIGHT, right);
Expand Down

0 comments on commit 616575c

Please sign in to comment.