* [PATCH] Input: ALPS - switch to using input_mt_report_finger_count
@ 2012-04-24 6:07 Dmitry Torokhov
2012-04-24 6:34 ` Henrik Rydberg
2012-04-25 15:50 ` Seth Forshee
0 siblings, 2 replies; 3+ messages in thread
From: Dmitry Torokhov @ 2012-04-24 6:07 UTC (permalink / raw)
To: linux-input; +Cc: Seth Forshee, Chase Douglas, Henrik Rydberg
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 <dtor@mail.ru>
---
Just compiled, not tested.
drivers/input/mouse/alps.c | 10 ++--------
1 files changed, 2 insertions(+), 8 deletions(-)
diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c
index ecd9389..4a1347e 100644
--- a/drivers/input/mouse/alps.c
+++ b/drivers/input/mouse/alps.c
@@ -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);
--
1.7.7.6
--
Dmitry
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] Input: ALPS - switch to using input_mt_report_finger_count
2012-04-24 6:07 [PATCH] Input: ALPS - switch to using input_mt_report_finger_count Dmitry Torokhov
@ 2012-04-24 6:34 ` Henrik Rydberg
2012-04-25 15:50 ` Seth Forshee
1 sibling, 0 replies; 3+ messages in thread
From: Henrik Rydberg @ 2012-04-24 6:34 UTC (permalink / raw)
To: Dmitry Torokhov; +Cc: linux-input, Seth Forshee, Chase Douglas
On Mon, Apr 23, 2012 at 11:07:41PM -0700, Dmitry Torokhov wrote:
> 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 <dtor@mail.ru>
> ---
>
> Just compiled, not tested.
Thanks for this, Dmitry. I noticed the patch in the stream, but was
never cc:d, so it slipped.
Henrik
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Input: ALPS - switch to using input_mt_report_finger_count
2012-04-24 6:07 [PATCH] Input: ALPS - switch to using input_mt_report_finger_count Dmitry Torokhov
2012-04-24 6:34 ` Henrik Rydberg
@ 2012-04-25 15:50 ` Seth Forshee
1 sibling, 0 replies; 3+ messages in thread
From: Seth Forshee @ 2012-04-25 15:50 UTC (permalink / raw)
To: Dmitry Torokhov; +Cc: linux-input, Chase Douglas, Henrik Rydberg
On Mon, Apr 23, 2012 at 11:07:41PM -0700, Dmitry Torokhov wrote:
> 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 <dtor@mail.ru>
> ---
>
> Just compiled, not tested.
It's working fine for me.
Acked-by: Seth Forshee <seth.forshee@canonical.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-04-25 15:50 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-24 6:07 [PATCH] Input: ALPS - switch to using input_mt_report_finger_count Dmitry Torokhov
2012-04-24 6:34 ` Henrik Rydberg
2012-04-25 15:50 ` Seth Forshee
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).