Input: synaptics - fix middle button on Lenovo 2015 products
authorDmitry Torokhov <dmitry.torokhov@gmail.com>
Mon, 9 Mar 2015 05:30:43 +0000 (22:30 -0700)
committerSasha Levin <sasha.levin@oracle.com>
Fri, 17 Apr 2015 00:11:34 +0000 (20:11 -0400)
commit376cfea5a6fb52844443d542901f59f956c78e6a
tree91c20626f15747abb524574af53918395bd78509
parentad565a9e13d90f1c70111f1633794499d750e3e3
Input: synaptics - fix middle button on Lenovo 2015 products

[ Upstream commit dc5465dc8a6d5cae8a0e1d8826bdcb2e4cb261ab ]

On the X1 Carbon 3rd gen (with a 2015 broadwell cpu), the physical middle
button of the trackstick (attached to the touchpad serio device, of course)
seems to get lost.

Actually, the touchpads reports 3 extra buttons, which falls in the switch
below to the '2' case. Let's handle the case of odd numbers also, so that
the middle button finds its way back.

Cc: stable@vger.kernel.org
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
drivers/input/mouse/synaptics.c