aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/mouse/hgpk.c
diff options
context:
space:
mode:
authorAndres Salomon <dilinger@queued.net>2008-11-11 09:52:21 -0500
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2008-11-11 11:32:07 -0500
commit5fb17fd9a2d05be77be91369aa2f7b0db42fc8b4 (patch)
treeb2fa75d7fe568b63804f3316784323c1f6c32205 /drivers/input/mouse/hgpk.c
parentd6d79a785d430c0e17f7e2d662f10de022cbca93 (diff)
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 <dilinger@debian.org> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input/mouse/hgpk.c')
-rw-r--r--drivers/input/mouse/hgpk.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/input/mouse/hgpk.c b/drivers/input/mouse/hgpk.c
index e82d34201e97..88f04bf2ad6c 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,
125 */ 125 */
126static int hgpk_validate_byte(unsigned char *packet) 126static int hgpk_validate_byte(unsigned char *packet)
127{ 127{
128 return (packet[0] & 0x0C) == 0x08; 128 return (packet[0] & 0x0C) != 0x08;
129} 129}
130 130
131static void hgpk_process_packet(struct psmouse *psmouse) 131static void hgpk_process_packet(struct psmouse *psmouse)