summaryrefslogtreecommitdiff
path: root/include/uapi/linux/usb
diff options
context:
space:
mode:
authorMacpaul Lin <macpaul.lin@mediatek.com>2020-06-18 12:13:38 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-06-18 17:07:57 +0300
commit81c7462883b0cc0a4eeef0687f80ad5b5baee5f6 (patch)
tree5f1cb16db49460e9a7947deb8fb65e23a1526cb1 /include/uapi/linux/usb
parentcda37dbbf17a3a49d434bd1c85eff762faebf3ef (diff)
downloadlinux-81c7462883b0cc0a4eeef0687f80ad5b5baee5f6.tar.xz
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>
Diffstat (limited to 'include/uapi/linux/usb')
-rw-r--r--include/uapi/linux/usb/ch9.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/uapi/linux/usb/ch9.h b/include/uapi/linux/usb/ch9.h
index 456ab0c2b586..b1ed2ccfe9cf 100644
--- a/include/uapi/linux/usb/ch9.h
+++ b/include/uapi/linux/usb/ch9.h
@@ -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;