mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-07 04:12:04 -04:00
USB: replace hardcode maximum usb string length by definition
commit 81c7462883b0cc0a4eeef0687f80ad5b5baee5f6 upstream. 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:
parent
f893661646
commit
c92aebf2b0
4 changed files with 8 additions and 5 deletions
|
|
@ -364,6 +364,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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue