提交 09072543 编写于 作者: G Gerard Cauvy 提交者: Felipe Balbi

usb: dwc3: debugfs: fix off by one when entering testmode

When implementing the USB2 testmode support via debugfs,
Felipe has committed a mistake when counting the number
of letters of some of the strings, resulting on an off
by one error which prevented some of the Test modes to
be entered properly.

This patch, fixes that mistake.
Signed-off-by: NGerard Cauvy <g-cauvy1@ti.com>
Signed-off-by: NFelipe Balbi <balbi@ti.com>
上级 2e81c36a
...@@ -525,11 +525,11 @@ static ssize_t dwc3_testmode_write(struct file *file, ...@@ -525,11 +525,11 @@ static ssize_t dwc3_testmode_write(struct file *file,
testmode = TEST_J; testmode = TEST_J;
else if (!strncmp(buf, "test_k", 6)) else if (!strncmp(buf, "test_k", 6))
testmode = TEST_K; testmode = TEST_K;
else if (!strncmp(buf, "test_se0_nak", 13)) else if (!strncmp(buf, "test_se0_nak", 12))
testmode = TEST_SE0_NAK; testmode = TEST_SE0_NAK;
else if (!strncmp(buf, "test_packet", 12)) else if (!strncmp(buf, "test_packet", 11))
testmode = TEST_PACKET; testmode = TEST_PACKET;
else if (!strncmp(buf, "test_force_enable", 18)) else if (!strncmp(buf, "test_force_enable", 17))
testmode = TEST_FORCE_EN; testmode = TEST_FORCE_EN;
else else
testmode = 0; testmode = 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册