Skip to content

Commit

Permalink
Input: synaptics - fix setting packet size on passthrough port.
Browse files Browse the repository at this point in the history
Synaptics driver used child->type to select either 3-byte or 4-byte
packet size for the pass-through port; this gives wrong results for
the newer protocols. Change the check to use child->pktsize instead.

Signed-off-by: Sergey Vlasov <vsu@altlinux.ru>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
  • Loading branch information
Sergey Vlasov authored and Dmitry Torokhov committed Jul 24, 2005
1 parent 5ac7ba3 commit 33fdfa9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/input/mouse/synaptics.c
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ static void synaptics_pass_pt_packet(struct serio *ptport, unsigned char *packet
serio_interrupt(ptport, packet[1], 0, NULL);
serio_interrupt(ptport, packet[4], 0, NULL);
serio_interrupt(ptport, packet[5], 0, NULL);
if (child->type >= PSMOUSE_GENPS)
if (child->pktsize == 4)
serio_interrupt(ptport, packet[2], 0, NULL);
} else
serio_interrupt(ptport, packet[1], 0, NULL);
Expand All @@ -233,7 +233,7 @@ static void synaptics_pt_activate(struct psmouse *psmouse)

/* adjust the touchpad to child's choice of protocol */
if (child) {
if (child->type >= PSMOUSE_GENPS)
if (child->pktsize == 4)
priv->mode |= SYN_BIT_FOUR_BYTE_CLIENT;
else
priv->mode &= ~SYN_BIT_FOUR_BYTE_CLIENT;
Expand Down

0 comments on commit 33fdfa9

Please sign in to comment.