From patchwork Sat Dec 18 14:52:59 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Henrik Rydberg X-Patchwork-Id: 418041 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id oBIEsIRS003452 for ; Sat, 18 Dec 2010 14:54:18 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756476Ab0LROyI (ORCPT ); Sat, 18 Dec 2010 09:54:08 -0500 Received: from ch-smtp02.sth.basefarm.net ([80.76.149.213]:57835 "EHLO ch-smtp02.sth.basefarm.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756452Ab0LROyG (ORCPT ); Sat, 18 Dec 2010 09:54:06 -0500 Received: from c83-248-200-95.bredband.comhem.se ([83.248.200.95]:45162 helo=polaris) by ch-smtp02.sth.basefarm.net with smtp (Exim 4.72) (envelope-from ) id 1PTyA0-0000Ec-82; Sat, 18 Dec 2010 15:53:27 +0100 Received: by polaris (sSMTP sendmail emulation); Sat, 18 Dec 2010 15:53:24 +0100 From: "Henrik Rydberg" To: Dmitry Torokhov Cc: Jiri Kosina , Chase Douglas , Chris Bagwell , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, Henrik Rydberg Subject: [PATCH 2/4] Input: synaptics - ignore bogus mt packet Date: Sat, 18 Dec 2010 15:52:59 +0100 Message-Id: <1292683981-6908-3-git-send-email-rydberg@euromail.se> X-Mailer: git-send-email 1.7.2.3 In-Reply-To: <1292683981-6908-1-git-send-email-rydberg@euromail.se> References: <1292683981-6908-1-git-send-email-rydberg@euromail.se> X-Originating-IP: 83.248.200.95 X-Scan-Result: No virus found in message 1PTyA0-0000Ec-82. X-Scan-Signature: ch-smtp02.sth.basefarm.net 1PTyA0-0000Ec-82 2af61c7420b357ec9140d158e97da3c1 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Sat, 18 Dec 2010 14:54:18 +0000 (UTC) diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c index 8a769e9..4744064 100644 --- a/drivers/input/mouse/synaptics.c +++ b/drivers/input/mouse/synaptics.c @@ -526,7 +526,7 @@ static void synaptics_process_packet(struct psmouse *psmouse) return; } - if (hw.z > 0) { + if (hw.z > 0 && hw.x > 1) { num_fingers = 1; finger_width = 5; if (SYN_CAP_EXTENDED(priv->capabilities)) { @@ -558,7 +558,7 @@ static void synaptics_process_packet(struct psmouse *psmouse) if (hw.z > 30) input_report_key(dev, BTN_TOUCH, 1); if (hw.z < 25) input_report_key(dev, BTN_TOUCH, 0); - if (hw.z > 0) { + if (hw.z > 0 && hw.x > 1) { input_report_abs(dev, ABS_X, hw.x); input_report_abs(dev, ABS_Y, YMAX_NOMINAL + YMIN_NOMINAL - hw.y); }