From patchwork Fri Nov 26 13:01:38 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tero Kristo X-Patchwork-Id: 12640823 X-Patchwork-Delegate: jikos@jikos.cz Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D7434C433EF for ; Fri, 26 Nov 2021 13:08:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232000AbhKZNLc (ORCPT ); Fri, 26 Nov 2021 08:11:32 -0500 Received: from mga18.intel.com ([134.134.136.126]:38673 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236464AbhKZNJb (ORCPT ); Fri, 26 Nov 2021 08:09:31 -0500 X-IronPort-AV: E=McAfee;i="6200,9189,10179"; a="222532991" X-IronPort-AV: E=Sophos;i="5.87,266,1631602800"; d="scan'208";a="222532991" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Nov 2021 05:02:08 -0800 X-IronPort-AV: E=Sophos;i="5.87,266,1631602800"; d="scan'208";a="498395662" Received: from asaechnx-mobl2.ccr.corp.intel.com (HELO tkristo-desk.intel.com) ([10.249.34.152]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Nov 2021 05:02:06 -0800 From: Tero Kristo To: linux-input@vger.kernel.org, benjamin.tissoires@redhat.com, jikos@kernel.org, mika.westerberg@linux.intel.com, tero.kristo@linux.intel.com Cc: linux-kernel@vger.kernel.org, dmitry.torokhov@gmail.com, peter.hutterer@who-t.net Subject: [RFCv2 5/8] HID: core: map USI pen style reports directly Date: Fri, 26 Nov 2021 15:01:38 +0200 Message-Id: <20211126130141.1811848-6-tero.kristo@linux.intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211126130141.1811848-1-tero.kristo@linux.intel.com> References: <20211126130141.1811848-1-tero.kristo@linux.intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org USI pen style reports have funky layout, so don't try to parse them. Instead, handle them identically to variable report items. Signed-off-by: Tero Kristo --- drivers/hid/hid-core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c index 525dbc59633f..315dc2b8ecbb 100644 --- a/drivers/hid/hid-core.c +++ b/drivers/hid/hid-core.c @@ -1567,8 +1567,8 @@ static void hid_input_field(struct hid_device *hid, struct hid_field *field, } for (n = 0; n < count; n++) { - - if (HID_MAIN_ITEM_VARIABLE & field->flags) { + if (HID_MAIN_ITEM_VARIABLE & field->flags || + field->logical == HID_DG_PEN_LINE_STYLE) { hid_process_event(hid, field, &field->usage[n], value[n], interrupt); continue; }