Skip to content

Commit d0341ef

Browse files
committed
Revert "HID: logitech: fix a used uninitialized GCC warning"
This reverts commit 5fe2ccb. 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 <benjamin.tissoires@redhat.com> Acked-by: Harry Cutts <hcutts@chromium.org> Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Acked-by: Jiri Kosina <jkosina@suse.cz>
1 parent e2b95b2 commit d0341ef

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

drivers/hid/hid-logitech-hidpp.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1231,6 +1231,7 @@ static int hidpp_hrw_get_wheel_capability(struct hidpp_device *hidpp,
12311231
*multiplier = response.fap.params[0];
12321232
return 0;
12331233
return_default:
1234+
*multiplier = 8;
12341235
hid_warn(hidpp->hid_dev,
12351236
"Couldn't get wheel multiplier (error %d), assuming %d.\n",
12361237
ret, *multiplier);
@@ -2695,17 +2696,18 @@ static int hi_res_scroll_look_up_microns(__u32 product_id)
26952696
static int hi_res_scroll_enable(struct hidpp_device *hidpp)
26962697
{
26972698
int ret;
2698-
u8 multiplier = 8;
2699+
u8 multiplier;
26992700

27002701
if (hidpp->quirks & HIDPP_QUIRK_HI_RES_SCROLL_X2121) {
27012702
ret = hidpp_hrw_set_wheel_mode(hidpp, false, true, false);
27022703
hidpp_hrw_get_wheel_capability(hidpp, &multiplier);
27032704
} else if (hidpp->quirks & HIDPP_QUIRK_HI_RES_SCROLL_X2120) {
27042705
ret = hidpp_hrs_set_highres_scrolling_mode(hidpp, true,
27052706
&multiplier);
2706-
} else /* if (hidpp->quirks & HIDPP_QUIRK_HI_RES_SCROLL_1P0) */
2707+
} else /* if (hidpp->quirks & HIDPP_QUIRK_HI_RES_SCROLL_1P0) */ {
27072708
ret = hidpp10_enable_scrolling_acceleration(hidpp);
2708-
2709+
multiplier = 8;
2710+
}
27092711
if (ret)
27102712
return ret;
27112713

0 commit comments

Comments
 (0)