Commit 28ba6011 authored by Max Staudt's avatar Max Staudt Committed by Jiri Kosina

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: default avatarMax Staudt <max@enpas.org>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.com>
parent 5307de63
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment