lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 15 Feb 2013 11:54:11 -0800
From:	Daniel Kurtz <djkurtz@...omium.org>
To:	Henrik Rydberg <rydberg@...omail.se>
Cc:	Dmitry Torokhov <dmitry.torokhov@...il.com>,
	linux-input@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] Input: synaptics - initialize pointer emulation usage

On Fri, Feb 15, 2013 at 11:36 AM, Henrik Rydberg <rydberg@...omail.se> wrote:
> To properly setup event parameters for emulated events, pass
> the appropriate flag to the slot initialization function. Also,
> all MT-related events should be setup before initialization.
>
> Incidentally, this solves the issue of doubly filtered pointer
> events.
>
> Reported-by: Daniel Kurtz <djkurtz@...omium.org>
> Signed-off-by: Henrik Rydberg <rydberg@...omail.se>
> ---
> Hi Daniel,
>
> This patch has only been compile tested, but chances are that it will
> work for you, together with the previous patch.
>
> Cheers,
> Henrik
>
>  drivers/input/mouse/synaptics.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c
> index 12d12ca..a8590ad 100644
> --- a/drivers/input/mouse/synaptics.c
> +++ b/drivers/input/mouse/synaptics.c
> @@ -1247,11 +1247,11 @@ static void set_input_params(struct input_dev *dev, struct synaptics_data *priv)
>         input_set_abs_params(dev, ABS_PRESSURE, 0, 255, 0, 0);
>
>         if (SYN_CAP_IMAGE_SENSOR(priv->ext_cap_0c)) {
> -               input_mt_init_slots(dev, 2, 0);
>                 set_abs_position_params(dev, priv, ABS_MT_POSITION_X,
>                                         ABS_MT_POSITION_Y);
>                 /* Image sensors can report per-contact pressure */
>                 input_set_abs_params(dev, ABS_MT_PRESSURE, 0, 255, 0, 0);
> +               input_mt_init_slots(dev, 2, INPUT_MT_POINTER);

ABS_X/Y/PRESSURE are already init'ed in the common code a few lines
above the if ().
Perhaps you could refactor things a bit to only define them once?

Thanks,
-Dan

>
>                 /* Image sensors can signal 4 and 5 finger clicks */
>                 __set_bit(BTN_TOOL_QUADTAP, dev->keybit);
> --
> 1.8.1.2
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ