From: Andres Salomon Date: Tue, 11 Nov 2008 14:52:21 +0000 (-0500) Subject: Input: psmouse - fix incorrect validate_byte check in OLPC protocol X-Git-Tag: v3.12-rc1~17088^2~5 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5fb17fd9a2d05be77be91369aa2f7b0db42fc8b4;p=kernel%2Fkernel-generic.git Input: psmouse - fix incorrect validate_byte check in OLPC protocol The validate_byte check logic was backwards; it should return true for an *invalid* packet. Thanks to Jeremy Katz for spotting this one. Signed-off-by: Andres Salomon Signed-off-by: Dmitry Torokhov --- diff --git a/drivers/input/mouse/hgpk.c b/drivers/input/mouse/hgpk.c index e82d342..88f04bf 100644 --- a/drivers/input/mouse/hgpk.c +++ b/drivers/input/mouse/hgpk.c @@ -125,7 +125,7 @@ static void hgpk_spewing_hack(struct psmouse *psmouse, */ static int hgpk_validate_byte(unsigned char *packet) { - return (packet[0] & 0x0C) == 0x08; + return (packet[0] & 0x0C) != 0x08; } static void hgpk_process_packet(struct psmouse *psmouse)