Skip to content

Commit 28ba601

Browse files
Max StaudtJiri Kosina
authored andcommitted
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]>
1 parent 5307de6 commit 28ba601

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

drivers/hid/hid-nintendo.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2503,8 +2503,11 @@ static int joycon_init(struct hid_device *hdev)
25032503
/* set baudrate for improved latency */
25042504
ret = joycon_send_usb(ctlr, JC_USB_CMD_BAUDRATE_3M, HZ);
25052505
if (ret) {
2506-
hid_err(hdev, "Failed to set baudrate; ret=%d\n", ret);
2507-
goto out_unlock;
2506+
/*
2507+
* We can function with the default baudrate.
2508+
* Provide a warning, and continue on.
2509+
*/
2510+
hid_warn(hdev, "Failed to set baudrate (ret=%d), continuing anyway\n", ret);
25082511
}
25092512
/* handshake */
25102513
ret = joycon_send_usb(ctlr, JC_USB_CMD_HANDSHAKE, HZ);

0 commit comments

Comments
 (0)