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:

committed by
Greg Kroah-Hartman

parent
cda37dbbf1
commit
81c7462883
@@ -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;
|
||||
|
Reference in New Issue
Block a user