Input: synaptics - initialize pointer emulation usage
authorHenrik Rydberg <rydberg@euromail.se>
Sat, 16 Feb 2013 01:04:03 +0000 (17:04 -0800)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Sat, 16 Feb 2013 02:52:54 +0000 (18:52 -0800)
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@chromium.org>
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/mouse/synaptics.c

index c3d1c86ac591100561eb7b14138afa841126aa15..2f78538e09d0f9e733be6f862a4de8e9d2c0301c 100644 (file)
@@ -1271,11 +1271,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);
 
                /* Image sensors can signal 4 and 5 finger clicks */
                __set_bit(BTN_TOOL_QUADTAP, dev->keybit);