aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Staudt <[email protected]>2024-03-16 01:57:29 +0900
committerJiri Kosina <[email protected]>2024-04-03 13:39:19 +0200
commit28ba6011f5dfd337e61e9c5618824115c63be66a (patch)
treea08b730e9c32760c11581af40721713d720e6ae1
parent5307de63d71d0b2303a8c645493a36021bedd800 (diff)
HID: nintendo: Don't fail on setting baud rate
Some third-party controllers can't change the baud rate. We can still use the gamepad as-is, so let's do that. Signed-off-by: Max Staudt <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
-rw-r--r--drivers/hid/hid-nintendo.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/hid/hid-nintendo.c b/drivers/hid/hid-nintendo.c
index ce88ac7617fd..e311b092e758 100644
--- a/drivers/hid/hid-nintendo.c
+++ b/drivers/hid/hid-nintendo.c
@@ -2503,8 +2503,11 @@ static int joycon_init(struct hid_device *hdev)
/* set baudrate for improved latency */
ret = joycon_send_usb(ctlr, JC_USB_CMD_BAUDRATE_3M, HZ);
if (ret) {
- hid_err(hdev, "Failed to set baudrate; ret=%d\n", ret);
- goto out_unlock;
+ /*
+ * We can function with the default baudrate.
+ * Provide a warning, and continue on.
+ */
+ hid_warn(hdev, "Failed to set baudrate (ret=%d), continuing anyway\n", ret);
}
/* handshake */
ret = joycon_send_usb(ctlr, JC_USB_CMD_HANDSHAKE, HZ);