Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp874485imm; Tue, 3 Jul 2018 01:17:11 -0700 (PDT) X-Google-Smtp-Source: AAOMgpeIwy+LDJVI81I8RUaKAvZMTmzbHcvaYhz6E/yVmVYFeKFtjo8BdjuM/bdFnxMsD8OKBy5H X-Received: by 2002:a62:a50e:: with SMTP id v14-v6mr28680855pfm.121.1530605831903; Tue, 03 Jul 2018 01:17:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530605831; cv=none; d=google.com; s=arc-20160816; b=uJ6ik1KOtdGaLC4+W4WnS94X9atEx4qxyGncfCQdTaY55J0+sdJE1NvAmYQkSamRTY ikcKLvLglg+O6zuNAix+tx9KqC8Om/ZaK9jROrqA/vZMc18TkHUhswFTvvvZTguCoq7t Jh/2CIwHM3YlQUe98tgQr9rzJL5t+ofH2sFDVWHK4mAMSr2WH5pye7qgRv9FHQy+uUtS 4t3/0GKQ9Jc0/OkoSmoJVudQPtJnZa4QITavDjBNyOG3iF4tvImr1yP4952zuYcT3wV/ nvzZYXKJ/+KHA64sL+5tvZVbdcVRwfb/JBtLUFqs67tOlekvDvrnD31r0tALt+ZnrS92 nGlQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:arc-authentication-results; bh=w0Hk1efeEbNyru1ZbH88RMPRNQqUWfrRs5O2hrfBIQk=; b=sL08juH7fgVj6+mlD/03KH/yMT6PL5sX1Z2+ysvrseFpU/dV+yNeL621Ara/XT3kHN bqgQW2K0i++yW02XZ+IJ53Wv07GbmQMLj/JhkSJ3tjMSLLwRVBPkRIOS0cF6oRr17aZ6 4DxsbhmBTrg0J1PFO1hbg5Qxe+2DLFc+NmBQQy9XqJdmLpQ3HiNKrSHkErtEDPnfXq+q LFM0/CYx2Ml5xGQxt8mbAtupkNn6Jo1YrIxPPFkvYIbMjGCmq4zELT5XVlx+hrMB2J8J q6075E+9Ou4mA2XpUivtYUXjuN4WexwMpSqTi9zSqVvv3zh39gWU7ZvuMxTnXlmVgH0+ RkzA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t128-v6si637352pfc.194.2018.07.03.01.16.57; Tue, 03 Jul 2018 01:17:11 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933475AbeGCIQE (ORCPT + 99 others); Tue, 3 Jul 2018 04:16:04 -0400 Received: from mail-qt0-f193.google.com ([209.85.216.193]:41762 "EHLO mail-qt0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933013AbeGCIQC (ORCPT ); Tue, 3 Jul 2018 04:16:02 -0400 Received: by mail-qt0-f193.google.com with SMTP id y20-v6so818105qto.8 for ; Tue, 03 Jul 2018 01:16:02 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=w0Hk1efeEbNyru1ZbH88RMPRNQqUWfrRs5O2hrfBIQk=; b=hbtPS9D52rYkITLQLDCqB+S+W7gACWrWjxC0Vs+Kyjr5CR9mKILIhaI1CR8ctJMMnB MOM/wuRjMfxOcWMCZGbUCDNx2D619GJiv33plAlBS4qnAJa6IOyTtgSTG+S0xds+XDe3 celuFdHMCOXSjaQDR/Ep5BebXTo3TFhcfLrj8t9R+p5FCrm7qGiqpvNPx4Cld6uaR7K9 gI4NQISnkbjBDQrO3PL29+zGSCTRWdj1rd32I1chN9jSeeqFjBGYyKjY1N9VKoB/BGEG n1TPA5UsksUJVu9XL67zY8zYoDTGWaI/eN3OwfN4WjJ7hNlPL7+E3mp16f8lIMDAOyE/ Beog== X-Gm-Message-State: APt69E2OyMx/utMsn40KX0e7u0F38m5rH2ZhdCEIwDIRbRUgW/J7sCZ7 doD72LVnFwirabnTY4vUTvcjGO1oFI8jUOKb1SGdiA== X-Received: by 2002:ac8:2dc6:: with SMTP id q6-v6mr23317213qta.178.1530605762020; Tue, 03 Jul 2018 01:16:02 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:ac8:2fca:0:0:0:0:0 with HTTP; Tue, 3 Jul 2018 01:16:01 -0700 (PDT) In-Reply-To: <0aaacf083be5b68a830f9e174f9abee3b00c5a51.1530402641.git.joeypabalinas@gmail.com> References: <0aaacf083be5b68a830f9e174f9abee3b00c5a51.1530402641.git.joeypabalinas@gmail.com> From: Benjamin Tissoires Date: Tue, 3 Jul 2018 10:16:01 +0200 Message-ID: Subject: Re: [PATCH 2/4] HID: multitouch: don't check HID_GROUP_MULTITOUCH_WIN_8 for serial protocol To: Joey Pabalinas Cc: "open list:HID CORE LAYER" , lkml , Jiri Kosina , Daniel Martin Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Jul 1, 2018 at 2:19 AM, Joey Pabalinas wrote: > The HID_GROUP_MULTITOUCH_WIN_8 group never needs to check for the serial > protocol, so avoid setting `td->serial_maybe = true;` in order to avoid > an unnecessary mt_post_parse_default_settings() call > > Signed-off-by: Joey Pabalinas > > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c > index a793076139d7d0db9b..c0654db0b736543ca0 100644 > --- a/drivers/hid/hid-multitouch.c > +++ b/drivers/hid/hid-multitouch.c > @@ -1460,11 +1460,13 @@ static int mt_probe(struct hid_device *hdev, const struct hid_device_id *id) > if (!td->fields) { > dev_err(&hdev->dev, "cannot allocate multitouch fields data\n"); > return -ENOMEM; > } > > - if (id->vendor == HID_ANY_ID && id->product == HID_ANY_ID) > + if (id->vendor == HID_ANY_ID > + && id->product == HID_ANY_ID > + && id->group != HID_GROUP_MULTITOUCH_WIN_8) There is a tiny difference between the HID group (this device looks like it is used as a Win 8 device) and the device class (this is effectively a Win8 device) It makes sense to remove this check for Win8 devices, but I don't think it should be done for all devices. All in all, it won't change much. Cheers, Benjamin > td->serial_maybe = true; > > /* This allows the driver to correctly support devices > * that emit events over several HID messages. > */ > -- > 2.18.0 >