usb: musb: Fix a few off-by-one lengths
authorRasmus Villemoes <linux@rasmusvillemoes.dk>
Thu, 27 Nov 2014 21:25:45 +0000 (22:25 +0100)
committerJiri Slaby <jslaby@suse.cz>
Thu, 29 Jan 2015 14:45:15 +0000 (15:45 +0100)
commit378d7e7d7c2e59a5800d8611c8caa65af4be674c
tree3a9fa6ff4c5a49c36f4fb3e10fd35fee205b964e
parentfdcc2a15ec6d4c4d7ef5562e92b2b83323e24106
usb: musb: Fix a few off-by-one lengths

commit e87c3f80ad0490d26ffe04754b7d094463b40f30 upstream.

!strncmp(buf, "force host", 9) is true if and only if buf starts with
"force hos". This was obviously not what was intended. The same error
exists for "force full-speed", "force high-speed" and "test
packet". Using strstarts avoids the error-prone hardcoding of the
prefix length.

For consistency, also change the other occurences of the !strncmp
idiom.

Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
drivers/usb/musb/musb_cppi41.c
drivers/usb/musb/musb_debugfs.c