aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/mouse/alps.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/input/mouse/alps.c')
-rw-r--r--drivers/input/mouse/alps.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c
index bd87380bd87..4c6a72d3d48 100644
--- a/drivers/input/mouse/alps.c
+++ b/drivers/input/mouse/alps.c
@@ -952,7 +952,9 @@ static const struct alps_model_info *alps_get_model(struct psmouse *psmouse, int
952 952
953 /* 953 /*
954 * First try "E6 report". 954 * First try "E6 report".
955 * ALPS should return 0,0,10 or 0,0,100 955 * ALPS should return 0,0,10 or 0,0,100 if no buttons are pressed.
956 * The bits 0-2 of the first byte will be 1s if some buttons are
957 * pressed.
956 */ 958 */
957 param[0] = 0; 959 param[0] = 0;
958 if (ps2_command(ps2dev, param, PSMOUSE_CMD_SETRES) || 960 if (ps2_command(ps2dev, param, PSMOUSE_CMD_SETRES) ||
@@ -968,7 +970,8 @@ static const struct alps_model_info *alps_get_model(struct psmouse *psmouse, int
968 psmouse_dbg(psmouse, "E6 report: %2.2x %2.2x %2.2x", 970 psmouse_dbg(psmouse, "E6 report: %2.2x %2.2x %2.2x",
969 param[0], param[1], param[2]); 971 param[0], param[1], param[2]);
970 972
971 if (param[0] != 0 || param[1] != 0 || (param[2] != 10 && param[2] != 100)) 973 if ((param[0] & 0xf8) != 0 || param[1] != 0 ||
974 (param[2] != 10 && param[2] != 100))
972 return NULL; 975 return NULL;
973 976
974 /* 977 /*