aboutsummaryrefslogtreecommitdiff
path: root/drivers/input
diff options
context:
space:
mode:
authorSteven Rostedt <srostedt@redhat.com>2012-03-14 12:07:59 -0400
committerSteven Rostedt <rostedt@goodmis.org>2012-03-14 12:07:59 -0400
commit00d1b23f6168bde0ef7f45549c7bff393374f498 (patch)
tree583ccf22b04281823c87dd25b476e37299e86184 /drivers/input
parent1a71c9ae0f844238de43681c41563a4203b7e933 (diff)
parent12b4af6966843baf7bb3aedbae93e69ae19405b0 (diff)
Merge tag 'v3.0.24' into v3.0-rt-next
This is the 3.0.24 stable release
Diffstat (limited to 'drivers/input')
-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 99d58764ef03..0b9944346ec3 100644
--- a/drivers/input/mouse/alps.c
+++ b/drivers/input/mouse/alps.c
@@ -426,7 +426,9 @@ static const struct alps_model_info *alps_get_model(struct psmouse *psmouse, int
/*
* First try "E6 report".
- * ALPS should return 0,0,10 or 0,0,100
+ * ALPS should return 0,0,10 or 0,0,100 if no buttons are pressed.
+ * The bits 0-2 of the first byte will be 1s if some buttons are
+ * pressed.
*/
param[0] = 0;
if (ps2_command(ps2dev, param, PSMOUSE_CMD_SETRES) ||
@@ -441,7 +443,8 @@ static const struct alps_model_info *alps_get_model(struct psmouse *psmouse, int
dbg("E6 report: %2.2x %2.2x %2.2x", param[0], param[1], param[2]);
- if (param[0] != 0 || param[1] != 0 || (param[2] != 10 && param[2] != 100))
+ if ((param[0] & 0xf8) != 0 || param[1] != 0 ||
+ (param[2] != 10 && param[2] != 100))
return NULL;
/*