Commit 56fd340e authored by Kevin Cernekee's avatar Kevin Cernekee Committed by Dmitry Torokhov

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: default avatarKevin Cernekee <cernekee@gmail.com>
Tested-by: default avatarDave Turvene <dturvene@dahetral.com>
Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
parent f673ceb1
...@@ -983,7 +983,7 @@ static int alps_enter_command_mode(struct psmouse *psmouse, ...@@ -983,7 +983,7 @@ static int alps_enter_command_mode(struct psmouse *psmouse,
return -1; return -1;
} }
if (param[0] != 0x88 && param[1] != 0x07) { if (param[0] != 0x88 || (param[1] != 0x07 && param[1] != 0x08)) {
psmouse_dbg(psmouse, psmouse_dbg(psmouse,
"unknown response while entering command mode\n"); "unknown response while entering command mode\n");
return -1; return -1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment