summaryrefslogtreecommitdiffstats
path: root/drivers/input/mouse/alps.c
diff options
context:
space:
mode:
authorKevin Cernekee <cernekee@gmail.com>2013-02-13 22:24:22 -0800
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2013-02-14 09:18:16 -0800
commit56fd340ebb533cb45c5eaf350cf889c43c5911e6 (patch)
tree1a0e6dc72346515e85d5d24747c7d2aff7c5dddc /drivers/input/mouse/alps.c
parentf673ceb11b880e8535476326612e54c3e0cace5b (diff)
downloadop-kernel-dev-56fd340ebb533cb45c5eaf350cf889c43c5911e6.zip
op-kernel-dev-56fd340ebb533cb45c5eaf350cf889c43c5911e6.tar.gz
Input: ALPS - fix command mode check
Pinnacle class devices should return "88 07 xx" or "88 08 xx" when entering command mode. If either the first byte or the second byte is invalid, return an error. Signed-off-by: Kevin Cernekee <cernekee@gmail.com> Tested-by: Dave Turvene <dturvene@dahetral.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input/mouse/alps.c')
-rw-r--r--drivers/input/mouse/alps.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c
index eafeae2..bfc1938 100644
--- a/drivers/input/mouse/alps.c
+++ b/drivers/input/mouse/alps.c
@@ -983,7 +983,7 @@ static int alps_enter_command_mode(struct psmouse *psmouse,
return -1;
}
- if (param[0] != 0x88 && param[1] != 0x07) {
+ if (param[0] != 0x88 || (param[1] != 0x07 && param[1] != 0x08)) {
psmouse_dbg(psmouse,
"unknown response while entering command mode\n");
return -1;
OpenPOWER on IntegriCloud