diff options
author | Gerard Cauvy <g-cauvy1@ti.com> | 2012-02-10 05:14:53 -0500 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2012-02-10 05:14:53 -0500 |
commit | 090725431b9636a0a59516ff0fe94933cf09a82b (patch) | |
tree | 068f4c7c274484d994b3eb68ad1bb9ff467e7c66 /drivers/usb/dwc3 | |
parent | 2e81c36a00d0eb8ce72faaaec1a1d865617374ae (diff) |
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: Gerard Cauvy <g-cauvy1@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/dwc3')
-rw-r--r-- | drivers/usb/dwc3/debugfs.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/usb/dwc3/debugfs.c b/drivers/usb/dwc3/debugfs.c index 78ec092db5eb..d4a30f118724 100644 --- a/drivers/usb/dwc3/debugfs.c +++ b/drivers/usb/dwc3/debugfs.c | |||
@@ -525,11 +525,11 @@ static ssize_t dwc3_testmode_write(struct file *file, | |||
525 | testmode = TEST_J; | 525 | testmode = TEST_J; |
526 | else if (!strncmp(buf, "test_k", 6)) | 526 | else if (!strncmp(buf, "test_k", 6)) |
527 | testmode = TEST_K; | 527 | testmode = TEST_K; |
528 | else if (!strncmp(buf, "test_se0_nak", 13)) | 528 | else if (!strncmp(buf, "test_se0_nak", 12)) |
529 | testmode = TEST_SE0_NAK; | 529 | testmode = TEST_SE0_NAK; |
530 | else if (!strncmp(buf, "test_packet", 12)) | 530 | else if (!strncmp(buf, "test_packet", 11)) |
531 | testmode = TEST_PACKET; | 531 | testmode = TEST_PACKET; |
532 | else if (!strncmp(buf, "test_force_enable", 18)) | 532 | else if (!strncmp(buf, "test_force_enable", 17)) |
533 | testmode = TEST_FORCE_EN; | 533 | testmode = TEST_FORCE_EN; |
534 | else | 534 | else |
535 | testmode = 0; | 535 | testmode = 0; |