2012-02-19 20:21:04

by Przemo Firszt

[permalink] [raw]
Subject: [PATCH] HID: wacom: fix proximity tool release

Don't zero the current tool before reporting its release to the input
subsystem.

Signed-off-by: Aristeu Rozanski <[email protected]>
Tested-by: Przemo Firszt <[email protected]>
---
drivers/hid/hid-wacom.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/hid/hid-wacom.c b/drivers/hid/hid-wacom.c
index 0621047..696b907 100644
--- a/drivers/hid/hid-wacom.c
+++ b/drivers/hid/hid-wacom.c
@@ -322,10 +322,10 @@ static void wacom_i4_parse_pen_report(struct wacom_data *wdata,

switch (data[1]) {
case 0x80: /* Out of proximity report */
- wdata->tool = 0;
input_report_key(input, BTN_TOUCH, 0);
input_report_abs(input, ABS_PRESSURE, 0);
input_report_key(input, wdata->tool, 0);
+ wdata->tool = 0;
input_sync(input);
break;
case 0xC2: /* Tool report */
--
1.7.6.4


2012-02-21 13:25:42

by Chris Bagwell

[permalink] [raw]
Subject: Re: [PATCH] HID: wacom: fix proximity tool release

Reviewed-by: Chris Bagwell <[email protected]>

On Sun, Feb 19, 2012 at 2:20 PM, Przemo Firszt <[email protected]> wrote:
> Don't zero the current tool before reporting its release to the input
> subsystem.
>
> Signed-off-by: Aristeu Rozanski <[email protected]>
> Tested-by: Przemo Firszt <[email protected]>
> ---
> ?drivers/hid/hid-wacom.c | ? ?2 +-
> ?1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/hid/hid-wacom.c b/drivers/hid/hid-wacom.c
> index 0621047..696b907 100644
> --- a/drivers/hid/hid-wacom.c
> +++ b/drivers/hid/hid-wacom.c
> @@ -322,10 +322,10 @@ static void wacom_i4_parse_pen_report(struct wacom_data *wdata,
>
> ? ? ? ?switch (data[1]) {
> ? ? ? ?case 0x80: /* Out of proximity report */
> - ? ? ? ? ? ? ? wdata->tool = 0;
> ? ? ? ? ? ? ? ?input_report_key(input, BTN_TOUCH, 0);
> ? ? ? ? ? ? ? ?input_report_abs(input, ABS_PRESSURE, 0);
> ? ? ? ? ? ? ? ?input_report_key(input, wdata->tool, 0);
> + ? ? ? ? ? ? ? wdata->tool = 0;
> ? ? ? ? ? ? ? ?input_sync(input);
> ? ? ? ? ? ? ? ?break;
> ? ? ? ?case 0xC2: /* Tool report */
> --
> 1.7.6.4
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-input" in
> the body of a message to [email protected]
> More majordomo info at ?http://vger.kernel.org/majordomo-info.html

2012-02-21 13:26:04

by Jiri Kosina

[permalink] [raw]
Subject: Re: [PATCH] HID: wacom: fix proximity tool release

On Sun, 19 Feb 2012, Przemo Firszt wrote:

> Don't zero the current tool before reporting its release to the input
> subsystem.
>
> Signed-off-by: Aristeu Rozanski <[email protected]>
> Tested-by: Przemo Firszt <[email protected]>
> ---
> drivers/hid/hid-wacom.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/hid/hid-wacom.c b/drivers/hid/hid-wacom.c
> index 0621047..696b907 100644
> --- a/drivers/hid/hid-wacom.c
> +++ b/drivers/hid/hid-wacom.c
> @@ -322,10 +322,10 @@ static void wacom_i4_parse_pen_report(struct wacom_data *wdata,
>
> switch (data[1]) {
> case 0x80: /* Out of proximity report */
> - wdata->tool = 0;
> input_report_key(input, BTN_TOUCH, 0);
> input_report_abs(input, ABS_PRESSURE, 0);
> input_report_key(input, wdata->tool, 0);
> + wdata->tool = 0;
> input_sync(input);
> break;
> case 0xC2: /* Tool report */

I have put this into my upstream-fixes branch. I think this should go into
3.3 still.

Thanks,

--
Jiri Kosina
SUSE Labs