diff options
author | Florian Tobias Schandinat <FlorianSchandinat@gmx.de> | 2012-03-20 18:59:50 +0000 |
---|---|---|
committer | Florian Tobias Schandinat <FlorianSchandinat@gmx.de> | 2012-03-20 18:59:50 +0000 |
commit | 44e8ba93cf330f075178e31759100f367313790a (patch) | |
tree | 27956beb159bfb603d672b43cb207690a087dd0a /drivers/input/mouse/alps.c | |
parent | e9fe8a714e450b26f76eaf8832f5b9fe24d00e79 (diff) | |
parent | c16fa4f2ad19908a47c63d8fa436a1178438c7e7 (diff) | |
download | talos-op-linux-44e8ba93cf330f075178e31759100f367313790a.tar.gz talos-op-linux-44e8ba93cf330f075178e31759100f367313790a.zip |
Merge commit 'v3.3' into fbdev-next
Diffstat (limited to 'drivers/input/mouse/alps.c')
-rw-r--r-- | drivers/input/mouse/alps.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c index bd87380bd879..4c6a72d3d48c 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 /* * 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) || @@ -968,7 +970,8 @@ static const struct alps_model_info *alps_get_model(struct psmouse *psmouse, int psmouse_dbg(psmouse, "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; /* |