aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget/composite.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/gadget/composite.c')
-rw-r--r--drivers/usb/gadget/composite.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c
index dd6d1905c148..391d169f8d07 100644
--- a/drivers/usb/gadget/composite.c
+++ b/drivers/usb/gadget/composite.c
@@ -1017,6 +1017,14 @@ static int composite_bind(struct usb_gadget *gadget)
1017 */ 1017 */
1018 usb_ep_autoconfig_reset(cdev->gadget); 1018 usb_ep_autoconfig_reset(cdev->gadget);
1019 1019
1020 /* standardized runtime overrides for device ID data */
1021 if (idVendor)
1022 cdev->desc.idVendor = cpu_to_le16(idVendor);
1023 if (idProduct)
1024 cdev->desc.idProduct = cpu_to_le16(idProduct);
1025 if (bcdDevice)
1026 cdev->desc.bcdDevice = cpu_to_le16(bcdDevice);
1027
1020 /* composite gadget needs to assign strings for whole device (like 1028 /* composite gadget needs to assign strings for whole device (like
1021 * serial number), register function drivers, potentially update 1029 * serial number), register function drivers, potentially update
1022 * power state and consumption, etc 1030 * power state and consumption, etc
@@ -1028,14 +1036,6 @@ static int composite_bind(struct usb_gadget *gadget)
1028 cdev->desc = *composite->dev; 1036 cdev->desc = *composite->dev;
1029 cdev->desc.bMaxPacketSize0 = gadget->ep0->maxpacket; 1037 cdev->desc.bMaxPacketSize0 = gadget->ep0->maxpacket;
1030 1038
1031 /* standardized runtime overrides for device ID data */
1032 if (idVendor)
1033 cdev->desc.idVendor = cpu_to_le16(idVendor);
1034 if (idProduct)
1035 cdev->desc.idProduct = cpu_to_le16(idProduct);
1036 if (bcdDevice)
1037 cdev->desc.bcdDevice = cpu_to_le16(bcdDevice);
1038
1039 /* strings can't be assigned before bind() allocates the 1039 /* strings can't be assigned before bind() allocates the
1040 * releavnt identifiers 1040 * releavnt identifiers
1041 */ 1041 */