USB: replace hardcode maximum usb string length by definition

Replace hardcoded maximum USB string length (126 bytes) by definition
"USB_MAX_STRING_LEN".

Signed-off-by: Macpaul Lin <macpaul.lin@mediatek.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Link: https://lore.kernel.org/r/1592471618-29428-1-git-send-email-macpaul.lin@mediatek.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Macpaul Lin
2020-06-18 17:13:38 +08:00
committed by Greg Kroah-Hartman
parent cda37dbbf1
commit 81c7462883
4 changed files with 8 additions and 5 deletions

View File

@@ -368,6 +368,9 @@ struct usb_config_descriptor {
/*-------------------------------------------------------------------------*/
/* USB String descriptors can contain at most 126 characters. */
#define USB_MAX_STRING_LEN 126
/* USB_DT_STRING: String descriptor */
struct usb_string_descriptor {
__u8 bLength;