[PATCH v2 04/14] HID: logitech-hidpp: Remove connected check for non-unifying devices

From
Hans de Goede <hidden>
Date
2023-10-08 09:55:54
Reply to
Hans de Goede, 2023-10-08
Non-unifying devices (USB, Bluetooth) are always connected during
probe(), remove the unnecessary connected check.

This is a preparation patch for moving querying if the device is connected
to after restarting IO, in case we miss a connect packet coming in while
IO is disabled during the restart.

Signed-off-by: Hans de Goede <redacted>
---
 drivers/hid/hid-logitech-hidpp.c | 7 -------
 1 file changed, 7 deletions(-)
diff --git a/drivers/hid/hid-logitech-hidpp.c b/drivers/hid/hid-logitech-hidpp.c
index e4dbbdf46b97..82f9723154f1 100644
--- a/drivers/hid/hid-logitech-hidpp.c
+++ b/drivers/hid/hid-logitech-hidpp.c
@@ -4480,13 +4480,6 @@ static int hidpp_probe(struct hid_device *hdev, const struct hid_device_id *id)
 
 	connected = hidpp_root_get_protocol_version(hidpp) == 0;
 	atomic_set(&hidpp->connected, connected);
-	if (!(hidpp->quirks & HIDPP_QUIRK_UNIFYING)) {
-		if (!connected) {
-			ret = -ENODEV;
-			hid_err(hdev, "Device not connected");
-			goto hid_hw_init_fail;
-		}
-	}
 
 	if (connected && hidpp->protocol_major >= 2) {
 		ret = hidpp_set_wireless_feature_index(hidpp);
-- 
2.41.0
Thread (20 messages) 20 messages, 2 authors, last reply 2023-10-10
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help