From: Kevin Cernekee Date: Thu, 14 Feb 2013 06:24:22 +0000 (-0800) Subject: Input: ALPS - fix command mode check X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=56fd340ebb533cb45c5eaf350cf889c43c5911e6;p=openwrt%2Fstaging%2Fblogic.git 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 Tested-by: Dave Turvene Signed-off-by: Dmitry Torokhov --- diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c index eafeae279356..bfc193806fc1 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;