diff options
author | Macpaul Lin <macpaul.lin@mediatek.com> | 2020-06-18 17:13:38 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-03-24 10:59:24 +0100 |
commit | fe0c15025a38372cfe08bda746bd2851408634fa (patch) | |
tree | 26efde28546e6c4de2375a419cfb1560d7d387a6 /include | |
parent | debd66577f059bab9d46130625920ee389858542 (diff) |
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>
Diffstat (limited to 'include')
-rw-r--r-- | include/uapi/linux/usb/ch9.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/uapi/linux/usb/ch9.h b/include/uapi/linux/usb/ch9.h index 33c603dd7cd3..8e0e6d3091f1 100644 --- a/include/uapi/linux/usb/ch9.h +++ b/include/uapi/linux/usb/ch9.h @@ -358,6 +358,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; |