]> rtime.felk.cvut.cz Git - zynq/linux.git/blobdiff - drivers/input/mouse/alps.c
Merge tag 'v4.0.8' into xlnx_4.0.8-rt6
[zynq/linux.git] / drivers / input / mouse / alps.c
index 27bcdbc950c9fc2df9067504cfe055bf379eee78..d5335e66424040235b56d38e758448d6ba2f3adb 100644 (file)
@@ -1042,9 +1042,8 @@ static void alps_process_trackstick_packet_v7(struct psmouse *psmouse)
        right = (packet[1] & 0x02) >> 1;
        middle = (packet[1] & 0x04) >> 2;
 
-       /* Divide 2 since trackpoint's speed is too fast */
-       input_report_rel(dev2, REL_X, (char)x / 2);
-       input_report_rel(dev2, REL_Y, -((char)y / 2));
+       input_report_rel(dev2, REL_X, (char)x);
+       input_report_rel(dev2, REL_Y, -((char)y));
 
        input_report_key(dev2, BTN_LEFT, left);
        input_report_key(dev2, BTN_RIGHT, right);
@@ -1159,13 +1158,14 @@ static void alps_report_bare_ps2_packet(struct psmouse *psmouse,
                                        bool report_buttons)
 {
        struct alps_data *priv = psmouse->private;
-       struct input_dev *dev;
+       struct input_dev *dev, *dev2 = NULL;
 
        /* Figure out which device to use to report the bare packet */
        if (priv->proto_version == ALPS_PROTO_V2 &&
            (priv->flags & ALPS_DUALPOINT)) {
                /* On V2 devices the DualPoint Stick reports bare packets */
                dev = priv->dev2;
+               dev2 = psmouse->dev;
        } else if (unlikely(IS_ERR_OR_NULL(priv->dev3))) {
                /* Register dev3 mouse if we received PS/2 packet first time */
                if (!IS_ERR(priv->dev3))
@@ -1177,7 +1177,7 @@ static void alps_report_bare_ps2_packet(struct psmouse *psmouse,
        }
 
        if (report_buttons)
-               alps_report_buttons(dev, NULL,
+               alps_report_buttons(dev, dev2,
                                packet[0] & 1, packet[0] & 2, packet[0] & 4);
 
        input_report_rel(dev, REL_X,