Skip to content

Commit 9ce363a

Browse files
jwrdegoedeBenjamin Tissoires
authored andcommitted
HID: logitech-hidpp: Drop HIDPP_QUIRK_UNIFYING
HIDPP unifying is only checked once in probe() and it is also set by probe() itself. Drop the quirk and replace its one check by the condition which is used to set the quirk in the first place. This series has been tested on the following devices: Logitech Bluetooth Laser Travel Mouse (bluetooth, HID++ 1.0) Logitech M720 Triathlon (bluetooth, HID++ 4.5) Logitech M720 Triathlon (unifying, HID++ 4.5) Logitech K400 Pro (unifying, HID++ 4.1) Logitech K270 (eQUAD nano Lite, HID++ 2.0) Logitech M185 (eQUAD nano Lite, HID++ 4.5) Logitech LX501 keyboard (27 Mhz, HID++ builtin scroll-wheel, HID++ 1.0) Logitech M-RAZ105 mouse (27 Mhz, HID++ extra mouse buttons, HID++ 1.0) And by bentiss: Logitech Touchpad T650 (unifying) Logitech Touchpad T651 (bluetooth) Logitech MX Master 3B (BLE) Logitech G403 (plain USB / Gaming receiver) Signed-off-by: Hans de Goede <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Benjamin Tissoires <[email protected]>
1 parent f3c4ee7 commit 9ce363a

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

drivers/hid/hid-logitech-hidpp.c

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -69,12 +69,11 @@ MODULE_PARM_DESC(disable_tap_to_click,
6969
#define HIDPP_QUIRK_WTP_PHYSICAL_BUTTONS BIT(22)
7070
#define HIDPP_QUIRK_DELAYED_INIT BIT(23)
7171
#define HIDPP_QUIRK_FORCE_OUTPUT_REPORTS BIT(24)
72-
#define HIDPP_QUIRK_UNIFYING BIT(25)
73-
#define HIDPP_QUIRK_HIDPP_WHEELS BIT(26)
74-
#define HIDPP_QUIRK_HIDPP_EXTRA_MOUSE_BTNS BIT(27)
75-
#define HIDPP_QUIRK_HIDPP_CONSUMER_VENDOR_KEYS BIT(28)
76-
#define HIDPP_QUIRK_HI_RES_SCROLL_1P0 BIT(29)
77-
#define HIDPP_QUIRK_WIRELESS_STATUS BIT(30)
72+
#define HIDPP_QUIRK_HIDPP_WHEELS BIT(25)
73+
#define HIDPP_QUIRK_HIDPP_EXTRA_MOUSE_BTNS BIT(26)
74+
#define HIDPP_QUIRK_HIDPP_CONSUMER_VENDOR_KEYS BIT(27)
75+
#define HIDPP_QUIRK_HI_RES_SCROLL_1P0 BIT(28)
76+
#define HIDPP_QUIRK_WIRELESS_STATUS BIT(29)
7877

7978
/* These are just aliases for now */
8079
#define HIDPP_QUIRK_KBD_SCROLL_WHEEL HIDPP_QUIRK_HIDPP_WHEELS
@@ -4405,9 +4404,6 @@ static int hidpp_probe(struct hid_device *hdev, const struct hid_device_id *id)
44054404
return hid_hw_start(hdev, HID_CONNECT_DEFAULT);
44064405
}
44074406

4408-
if (id->group == HID_GROUP_LOGITECH_DJ_DEVICE)
4409-
hidpp->quirks |= HIDPP_QUIRK_UNIFYING;
4410-
44114407
if (id->group == HID_GROUP_LOGITECH_27MHZ_DEVICE &&
44124408
hidpp_application_equals(hdev, HID_GD_MOUSE))
44134409
hidpp->quirks |= HIDPP_QUIRK_HIDPP_WHEELS |
@@ -4460,7 +4456,7 @@ static int hidpp_probe(struct hid_device *hdev, const struct hid_device_id *id)
44604456
hid_device_io_start(hdev);
44614457

44624458
/* Get name + serial, store in hdev->name + hdev->uniq */
4463-
if (hidpp->quirks & HIDPP_QUIRK_UNIFYING)
4459+
if (id->group == HID_GROUP_LOGITECH_DJ_DEVICE)
44644460
hidpp_unifying_init(hidpp);
44654461
else
44664462
hidpp_non_unifying_init(hidpp);

0 commit comments

Comments
 (0)