Skip to content

Commit

Permalink
Input: ALPS - fix command mode check
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Kevin Cernekee authored and Dmitry Torokhov committed Feb 14, 2013
1 parent f673ceb commit 56fd340
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/input/mouse/alps.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 56fd340

Please sign in to comment.