Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp7702023yba; Thu, 2 May 2019 14:45:30 -0700 (PDT) X-Google-Smtp-Source: APXvYqyRNRrKaSBlpqbgU1+8YNDyEvri0ckHrRpCGDREoI1mcMcI9MQldNo3v5rQY3SSPdzCkhXS X-Received: by 2002:a65:6289:: with SMTP id f9mr6516131pgv.380.1556833530113; Thu, 02 May 2019 14:45:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556833530; cv=none; d=google.com; s=arc-20160816; b=UfYl0OgH/a924QMU6Ez3N4cTynyVbMgAACO/BGchQIlON1CSbJK3E/mth8nfYJSY/q vDumfV3ZjbmOrQrw4CgW55cy2tNDIBFkYxfUFQKEW/UQ6PKxjthYnFnPnQmHoKm2W9HP B8rS3YjaTumcnK8lwS3sEEZ0whYMuLAnhKg8APlk1Vx8mCF1jl0M+JBumv2fZU6yl3nU xe6vDQRZdjy9qsylzf+9ue5HLRp08OpDb5mzr8uD770KgMsvaPVmkmmDWmU3aTJHdp5+ kVfdZF2zGyVuY8Zb0jy9dH1SZvmdkADqepD1ogerTitTh08VuokeaT6L5sY48nQIlkja XBzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:content-transfer-encoding:mime-version :message-id:date:subject:cc:from:dkim-signature; bh=FUkkXb89M9Ju/1kq/ADsVeKz9TuN3gFh0/5qWIJyqMI=; b=ExVrHhcHV8P3TJk97ALxI0ZkOBeVgr3Y1fHTyiUQeQvY5h4RN4EnzcVU8ZCf5TXyOz f25t1ZsssK8xz4Gkpz/dA5/1BsK8PLv4kJCL6mkNKV5y1vIfk86t4jkqoKgbeRl/Sph4 fp1kem29PQoTX/lpLXmwFvk6fqsL6ml5jsmVy5sAL+RnDR4LM6vNGCfV6PZnR5wQ2bJU lbHjKzXXQ1H46lrXTHunjWqPFihNnHS9eKM93iku7C71FQDdJ6HN+3IcMVa1uDgK7dis E/sq5MI8gu+K2G+JAEnTZLFkO0pJN7SOOCvvuvH12FLSCLsRlIgK5hFaXTQoAJ2BANqQ yP1A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@wp.pl header.s=1024a header.b=RlBJrdS6; 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=wp.pl Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o6si269806plh.186.2019.05.02.14.45.14; Thu, 02 May 2019 14:45:30 -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; dkim=fail (test mode) header.i=@wp.pl header.s=1024a header.b=RlBJrdS6; 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=wp.pl Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726218AbfEBVnk (ORCPT + 99 others); Thu, 2 May 2019 17:43:40 -0400 Received: from mx3.wp.pl ([212.77.101.9]:26469 "EHLO mx3.wp.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726022AbfEBVnk (ORCPT ); Thu, 2 May 2019 17:43:40 -0400 X-Greylist: delayed 400 seconds by postgrey-1.27 at vger.kernel.org; Thu, 02 May 2019 17:43:39 EDT Received: (wp-smtpd smtp.wp.pl 39377 invoked from network); 2 May 2019 23:36:56 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wp.pl; s=1024a; t=1556833016; bh=FUkkXb89M9Ju/1kq/ADsVeKz9TuN3gFh0/5qWIJyqMI=; h=From:To:Cc:Subject; b=RlBJrdS6MuaSJuLbf4MIN2cIzqbD3OoXOTFURjat2VMT37CSlBBypklfBAelYjAej WZrM5DIXYzYNiUH/lPxvz5WA967a4xnCJoGcYqoDoALXBT8hiwRGsCiRNTcywS3pB0 qJoQ//XkzU5b0CN7GCtVhHx5ONYrWCPKeQPxgly8= Received: from pc-201-108-240-185-static.strong-pc.com (HELO localhost.localdomain) (spaz16@wp.pl@[185.240.108.201]) (envelope-sender ) by smtp.wp.pl (WP-SMTPD) with ECDHE-RSA-AES256-GCM-SHA384 encrypted SMTP for ; 2 May 2019 23:36:56 +0200 From: =?UTF-8?q?B=C5=82a=C5=BCej=20Szczygie=C5=82?= Cc: igorkuo@gmail.com, =?UTF-8?q?B=C5=82a=C5=BCej=20Szczygie=C5=82?= , Jiri Kosina , Benjamin Tissoires , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] HID: fix A4Tech horizontal scrolling Date: Thu, 2 May 2019 23:36:39 +0200 Message-Id: <20190502213639.7632-1-spaz16@wp.pl> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-WP-MailID: 75b21af65cda25fe36520aade8dfb94b X-WP-AV: skaner antywirusowy Poczty Wirtualnej Polski X-WP-SPAM: NO 0000000 [YfMH] To: unlisted-recipients:; (no To-header on input) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Since recent high resolution scrolling changes the A4Tech driver must check for the "REL_WHEEL_HI_RES" usage code. Fixes: 2dc702c991e3774af9d7ce410eef410ca9e2357e (HID: input: use the Resolution Multiplier for high-resolution scrolling) Signed-off-by: Błażej Szczygieł --- drivers/hid/hid-a4tech.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/hid/hid-a4tech.c b/drivers/hid/hid-a4tech.c index 9428ea7cdf8a..fafb9fa558e7 100644 --- a/drivers/hid/hid-a4tech.c +++ b/drivers/hid/hid-a4tech.c @@ -38,7 +38,7 @@ static int a4_input_mapped(struct hid_device *hdev, struct hid_input *hi, { struct a4tech_sc *a4 = hid_get_drvdata(hdev); - if (usage->type == EV_REL && usage->code == REL_WHEEL) + if (usage->type == EV_REL && usage->code == REL_WHEEL_HI_RES) set_bit(REL_HWHEEL, *bit); if ((a4->quirks & A4_2WHEEL_MOUSE_HACK_7) && usage->hid == 0x00090007) @@ -60,7 +60,7 @@ static int a4_event(struct hid_device *hdev, struct hid_field *field, input = field->hidinput->input; if (a4->quirks & A4_2WHEEL_MOUSE_HACK_B8) { - if (usage->type == EV_REL && usage->code == REL_WHEEL) { + if (usage->type == EV_REL && usage->code == REL_WHEEL_HI_RES) { a4->delayed_value = value; return 1; } @@ -77,7 +77,7 @@ static int a4_event(struct hid_device *hdev, struct hid_field *field, return 1; } - if (usage->code == REL_WHEEL && a4->hw_wheel) { + if (usage->code == REL_WHEEL_HI_RES && a4->hw_wheel) { input_event(input, usage->type, REL_HWHEEL, value); return 1; } -- 2.21.0