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 11:05:02 +0100 |
commit | e93575764f70a5e59813d02a8f7cf7e1497d8185 (patch) | |
tree | bc067c18c46d04ea0b88013bd7a00cf07d8288dd /include | |
parent | 8ca5de14229b084c5eee88fad56e894c6c1bd059 (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 8512777889b0..4c02fa757af7 100644 --- a/include/uapi/linux/usb/ch9.h +++ b/include/uapi/linux/usb/ch9.h @@ -360,6 +360,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; |