usb: gadget: make sure each gadget is using same index for Product, Serial,…
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / drivers / usb / gadget / multi.c
index 60168877330a6d83fafa95e786977fc1ab0111f1..94b35e5539d75739fe4e0bfa2c379cc42614a4c0 100644 (file)
@@ -109,21 +109,16 @@ static const struct usb_descriptor_header *otg_desc[] = {
 
 
 enum {
-#ifdef CONFIG_USB_G_MULTI_RNDIS
-       MULTI_STRING_RNDIS_CONFIG_IDX,
-#endif
-#ifdef CONFIG_USB_G_MULTI_CDC
+       MULTI_STRING_RNDIS_CONFIG_IDX = USB_GADGET_FIRST_AVAIL_IDX,
        MULTI_STRING_CDC_CONFIG_IDX,
-#endif
 };
 
 static struct usb_string strings_dev[] = {
-#ifdef CONFIG_USB_G_MULTI_RNDIS
+       [USB_GADGET_MANUFACTURER_IDX].s = "",
+       [USB_GADGET_PRODUCT_IDX].s = "",
+       [USB_GADGET_SERIAL_IDX].s = "",
        [MULTI_STRING_RNDIS_CONFIG_IDX].s = "Multifunction with RNDIS",
-#endif
-#ifdef CONFIG_USB_G_MULTI_CDC
        [MULTI_STRING_CDC_CONFIG_IDX].s   = "Multifunction with CDC ECM",
-#endif
        {  } /* end of list */
 };