From patchwork Wed Feb 25 00:05:29 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Tissoires X-Patchwork-Id: 5876141 X-Patchwork-Delegate: jikos@jikos.cz Return-Path: X-Original-To: patchwork-linux-input@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id E5E609F373 for ; Wed, 25 Feb 2015 00:06:56 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 36D2A201B9 for ; Wed, 25 Feb 2015 00:06:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id F3D6A20253 for ; Wed, 25 Feb 2015 00:06:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751444AbbBYAGy (ORCPT ); Tue, 24 Feb 2015 19:06:54 -0500 Received: from mx1.redhat.com ([209.132.183.28]:39062 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753349AbbBYAFq (ORCPT ); Tue, 24 Feb 2015 19:05:46 -0500 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t1P05ZYc022774 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 24 Feb 2015 19:05:36 -0500 Received: from plouf.banquise.eu.com (ovpn-113-187.phx2.redhat.com [10.3.113.187]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t1P05VEo014917; Tue, 24 Feb 2015 19:05:35 -0500 From: Benjamin Tissoires To: Nikolai Kondrashov , Jiri Kosina Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, DIGImend-devel Subject: [PATCH 3/4] HID: uclogic: present only the working interfaces on the Huion tablets Date: Tue, 24 Feb 2015 19:05:29 -0500 Message-Id: <1424822730-14938-4-git-send-email-benjamin.tissoires@redhat.com> In-Reply-To: <1424822730-14938-1-git-send-email-benjamin.tissoires@redhat.com> References: <1424822730-14938-1-git-send-email-benjamin.tissoires@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The Huion tablets show 3 interfaces. Only the first and the third are currently used. Also remove HID_QUIRK_MULTI_INPUT for the third interface to not create more than needed input nodes. Signed-off-by: Benjamin Tissoires --- drivers/hid/hid-uclogic.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/hid/hid-uclogic.c b/drivers/hid/hid-uclogic.c index 397f1df..c03e076 100644 --- a/drivers/hid/hid-uclogic.c +++ b/drivers/hid/hid-uclogic.c @@ -840,6 +840,11 @@ static int uclogic_probe(struct hid_device *hdev, hid_err(hdev, "tablet enabling failed\n"); return rc; } + } else if (intf->cur_altsetting->desc.bInterfaceNumber == 2) { + hdev->quirks &= ~HID_QUIRK_MULTI_INPUT; + } else { + /* Ignore all unused interfaces */ + return -ENODEV; } break; }