From patchwork Sun Jul 9 18:54:51 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Echtler X-Patchwork-Id: 9831969 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 8F1CB60318 for ; Sun, 9 Jul 2017 19:04:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 73205274B4 for ; Sun, 9 Jul 2017 19:04:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 656A4283C3; Sun, 9 Jul 2017 19:04:13 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7673D274B4 for ; Sun, 9 Jul 2017 19:04:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752430AbdGITEF (ORCPT ); Sun, 9 Jul 2017 15:04:05 -0400 Received: from butterbrot.org ([176.9.106.16]:37777 "EHLO butterbrot.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752467AbdGITEF (ORCPT ); Sun, 9 Jul 2017 15:04:05 -0400 Received: from flunder.fritz.box (unknown [95.91.182.104]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) by butterbrot.org (Postfix) with ESMTPSA id 724174AE0278; Sun, 9 Jul 2017 20:55:02 +0200 (CEST) From: Florian Echtler To: linux-input@vger.kernel.org, dmitry.torokhov@gmail.com Cc: Florian Echtler , Martin Kaltenbrunner Subject: [PATCH 2/2] skip all blobs that are not touches Date: Sun, 9 Jul 2017 20:54:51 +0200 Message-Id: <1499626491-22592-2-git-send-email-floe@butterbrot.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1499626491-22592-1-git-send-email-floe@butterbrot.org> References: <1499626491-22592-1-git-send-email-floe@butterbrot.org> Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The SUR40 labels all reported blobs as touch, token, or generic blob. Previously, all blobs were reported as touch regardless of type, causing lots of false positives. Present patch fixes this. Signed-off-by: Martin Kaltenbrunner Signed-off-by: Florian Echtler --- drivers/input/touchscreen/sur40.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/input/touchscreen/sur40.c b/drivers/input/touchscreen/sur40.c index 12bdee9..fbd4010 100644 --- a/drivers/input/touchscreen/sur40.c +++ b/drivers/input/touchscreen/sur40.c @@ -309,6 +309,8 @@ static void sur40_report_blob(struct sur40_blob *blob, struct input_dev *input) int slotnum = input_mt_get_slot_by_key(input, blob->blob_id); if (slotnum < 0 || slotnum >= MAX_CONTACTS) return; + if (blob->type != SUR40_TOUCH) + return; input_mt_slot(input, slotnum); input_mt_report_slot_state(input, MT_TOOL_FINGER, 1);