Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2355301imu; Wed, 21 Nov 2018 10:17:20 -0800 (PST) X-Google-Smtp-Source: AFSGD/X3erCnXEfDKV19WK/nh8CC/hch5H2t0FRoUVW7gZ6CjAMIRgIOmY2UQrMXxrM55Ln1ieGA X-Received: by 2002:a17:902:7e0d:: with SMTP id b13mr7945773plm.154.1542824240392; Wed, 21 Nov 2018 10:17:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542824240; cv=none; d=google.com; s=arc-20160816; b=rlgFT1uBpiY1P0Z7IEN+o89/KtRYCuFaJcNN4OvUWEMBAKqzbGc5YawXkzbpDtOomZ wtVB5cktdfQrl3pPMh4T+E7unbmxxRpuOZaFtWITr8wLyGEB3LB/ljU99ojpSmKd4cun Cu/RcpRN+j4ZA9xTD0p4/Wd24UO7geh4A00tXUAQTFAW0IVbHumk3HXuiQeMrc2zv+WS w0U/5Giz1RFeqJsC1hi6R1cir+jBmFSkpDchE6XaxSwL4NXayyWAHH/X+wR6ZKwvl7yL zTN0rC3ULAjezOqypzR2ojnxtNP4rnuF3rx4cuekuhmoOrvzii/M3bEvOfpMkuNoxb0i Mzzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=v9VR9LmOrkdsCR7WJ2FC1MBbVV932p2+b4VdG+ImI3Q=; b=JjDleYe6O/VxcHBe9upqQrn4+x9GvhbMWEh9jFhOgUJDu4FK73XWXO5NaL6pdrBG/4 l2w9H2R2hdZ0u8UgfGfKGIcoAVjrY2zaYm9mNFxtz1vRQeys+gmSV62bJg7DSMT3Vtmb W+ej+C8dZ7gx8hGATRqdQWiZtUmoyq0QTcd3DbH2at75X3dpjJfFnS0ZQhFGdtnlUksR UMZiqM7sKi9HY4vybEaJS+5eIO43PUsESqycqqWsuCQP+RZCCkrhNcHL/QswaLkAo8ik TyEKbFqi+hW6Ci/euNmvymK0MBTtg8gXcvEHmOMa5t530up9V+Noe2riR4iAEgnPkEXi FZRw== 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 92si2583464plw.158.2018.11.21.10.16.46; Wed, 21 Nov 2018 10:17:20 -0800 (PST) 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 S1731361AbeKVCCX (ORCPT + 99 others); Wed, 21 Nov 2018 21:02:23 -0500 Received: from mx1.redhat.com ([209.132.183.28]:45486 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731213AbeKVCCW (ORCPT ); Wed, 21 Nov 2018 21:02:22 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 3184D30820F2; Wed, 21 Nov 2018 15:27:29 +0000 (UTC) Received: from plouf.redhat.com (ovpn-204-124.brq.redhat.com [10.40.204.124]) by smtp.corp.redhat.com (Postfix) with ESMTP id C229F103BAB7; Wed, 21 Nov 2018 15:27:26 +0000 (UTC) From: Benjamin Tissoires To: Dmitry Torokhov , Jiri Kosina , Harry Cutts , Peter Hutterer , torvalds@linux-foundation.org Cc: Nestor Lopez Casado , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, Benjamin Tissoires Subject: [PATCH 2/7] Revert "HID: logitech: fix a used uninitialized GCC warning" Date: Wed, 21 Nov 2018 16:27:07 +0100 Message-Id: <20181121152712.6770-3-benjamin.tissoires@redhat.com> In-Reply-To: <20181121152712.6770-1-benjamin.tissoires@redhat.com> References: <20181121152712.6770-1-benjamin.tissoires@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.47]); Wed, 21 Nov 2018 15:27:29 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This reverts commit 5fe2ccbef9d7aecf5c4402c753444f1a12096cfd. It turns out the current API is not that compatible with some Microsoft mice, so better start again from scratch. Signed-off-by: Benjamin Tissoires --- drivers/hid/hid-logitech-hidpp.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/hid/hid-logitech-hidpp.c b/drivers/hid/hid-logitech-hidpp.c index f01280898b24..5f0c080059c6 100644 --- a/drivers/hid/hid-logitech-hidpp.c +++ b/drivers/hid/hid-logitech-hidpp.c @@ -1231,6 +1231,7 @@ static int hidpp_hrw_get_wheel_capability(struct hidpp_device *hidpp, *multiplier = response.fap.params[0]; return 0; return_default: + *multiplier = 8; hid_warn(hidpp->hid_dev, "Couldn't get wheel multiplier (error %d), assuming %d.\n", ret, *multiplier); @@ -2695,7 +2696,7 @@ static int hi_res_scroll_look_up_microns(__u32 product_id) static int hi_res_scroll_enable(struct hidpp_device *hidpp) { int ret; - u8 multiplier = 8; + u8 multiplier; if (hidpp->quirks & HIDPP_QUIRK_HI_RES_SCROLL_X2121) { ret = hidpp_hrw_set_wheel_mode(hidpp, false, true, false); @@ -2703,9 +2704,10 @@ static int hi_res_scroll_enable(struct hidpp_device *hidpp) } else if (hidpp->quirks & HIDPP_QUIRK_HI_RES_SCROLL_X2120) { ret = hidpp_hrs_set_highres_scrolling_mode(hidpp, true, &multiplier); - } else /* if (hidpp->quirks & HIDPP_QUIRK_HI_RES_SCROLL_1P0) */ + } else /* if (hidpp->quirks & HIDPP_QUIRK_HI_RES_SCROLL_1P0) */ { ret = hidpp10_enable_scrolling_acceleration(hidpp); - + multiplier = 8; + } if (ret) return ret; -- 2.19.1