Input: ALPS - switch to using input_mt_report_finger_count
Subsystems (3)
Dmitry Torokhov
maintainerPATCH 1/1 Input: ALPS - switch to using input_mt_report_finger_count
Instead of open-coded reporting number of fingers on the touchpad let's use input_mt_report_finger_count() helper.
Signed-off-by Dmitry Torokhov <[email protected]>
---
Just compiled, not tested.
drivers/input/mouse/alps.c | 10 ++-------- 1 files changed, 2 insertions(+), 8 deletions(-)
drivers/input/mouse/alps.c +2 -8
@@ -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);
@@ -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);
Signature · 5 lines
1.7.7.6 -- Dmitry
Quoted 7 lines · Dmitry Torokhov
Instead of open-coded reporting number of fingers on the touchpad let's use
input_mt_report_finger_count()helper.Signed-off-by Dmitry Torokhov <[email protected]>---
Just compiled, not tested.
Thanks for this, Dmitry. I noticed the patch in the stream, but was never cc:d, so it slipped.
Henrik
Quoted 7 lines · Dmitry Torokhov
Instead of open-coded reporting number of fingers on the touchpad let's use
input_mt_report_finger_count()helper.Signed-off-by Dmitry Torokhov <[email protected]>---
Just compiled, not tested.
It's working fine for me.
Acked-by Seth Forshee <[email protected]>