Input: synaptics - do not retrieve the board id on old firmwares
authorBenjamin Tissoires <benjamin.tissoires@redhat.com>
Mon, 9 Mar 2015 05:33:36 +0000 (22:33 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Mon, 9 Mar 2015 06:36:52 +0000 (23:36 -0700)
The board id capability has been added in firmware 7.5.

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>
drivers/input/mouse/synaptics.c

index 2f42a712f3e051c4210da3437754ddabecd4d07e..2176874a41b11687f61bfb3fe8dfcf6289288e95 100644 (file)
@@ -250,6 +250,10 @@ static int synaptics_board_id(struct psmouse *psmouse)
        struct synaptics_data *priv = psmouse->private;
        unsigned char bid[3];
 
+       /* firmwares prior 7.5 have no board_id encoded */
+       if (SYN_ID_FULL(priv->identity) < 0x705)
+               return 0;
+
        if (synaptics_send_cmd(psmouse, SYN_QUE_MODES, bid))
                return -1;
        priv->board_id = ((bid[0] & 0xfc) << 6) | bid[1];