Loading drivers/usb/dwc3/gadget.c +4 −2 Original line number Diff line number Diff line Loading @@ -2617,10 +2617,12 @@ static int dwc3_gadget_init_endpoints(struct dwc3 *dwc, u8 total) /* Reserve EPs at the end for GSI */ if (!direction && num > out_count - NUM_GSI_OUT_EPS - 1) { snprintf(dep->name, sizeof(dep->name), "gsi-epout"); snprintf(dep->name, sizeof(dep->name), "gsi-epout%d", num); dep->endpoint.ep_type = EP_TYPE_GSI; } else if (direction && num > in_count - NUM_GSI_IN_EPS - 1) { snprintf(dep->name, sizeof(dep->name), "gsi-epin"); snprintf(dep->name, sizeof(dep->name), "gsi-epin%d", num); dep->endpoint.ep_type = EP_TYPE_GSI; } else { snprintf(dep->name, sizeof(dep->name), "ep%u%s", num, Loading drivers/usb/gadget/epautoconf.c +7 −2 Original line number Diff line number Diff line Loading @@ -211,7 +211,7 @@ void usb_ep_autoconfig_reset (struct usb_gadget *gadget) EXPORT_SYMBOL_GPL(usb_ep_autoconfig_reset); /** * usb_ep_autoconfig_by_name - Used to pick the endpoint by name. eg ep1in-gsi * usb_ep_autoconfig_by_name - Used to pick the endpoint by name. eg gsi-epin1 * @gadget: The device to which the endpoint must belong. * @desc: Endpoint descriptor, with endpoint direction and transfer mode * initialized. Loading @@ -227,8 +227,12 @@ struct usb_ep *usb_ep_autoconfig_by_name( struct usb_ep *ep; bool ep_found = false; if (!ep_name || !strlen(ep_name)) goto err; list_for_each_entry(ep, &gadget->ep_list, ep_list) if (strcmp(ep->name, ep_name) == 0 && !ep->driver_data) { if (strncmp(ep->name, ep_name, strlen(ep_name)) == 0 && !ep->driver_data) { ep_found = true; break; } Loading @@ -243,6 +247,7 @@ struct usb_ep *usb_ep_autoconfig_by_name( return ep; } err: pr_err("%s:error finding ep %s\n", __func__, ep_name); return NULL; } Loading Loading
drivers/usb/dwc3/gadget.c +4 −2 Original line number Diff line number Diff line Loading @@ -2617,10 +2617,12 @@ static int dwc3_gadget_init_endpoints(struct dwc3 *dwc, u8 total) /* Reserve EPs at the end for GSI */ if (!direction && num > out_count - NUM_GSI_OUT_EPS - 1) { snprintf(dep->name, sizeof(dep->name), "gsi-epout"); snprintf(dep->name, sizeof(dep->name), "gsi-epout%d", num); dep->endpoint.ep_type = EP_TYPE_GSI; } else if (direction && num > in_count - NUM_GSI_IN_EPS - 1) { snprintf(dep->name, sizeof(dep->name), "gsi-epin"); snprintf(dep->name, sizeof(dep->name), "gsi-epin%d", num); dep->endpoint.ep_type = EP_TYPE_GSI; } else { snprintf(dep->name, sizeof(dep->name), "ep%u%s", num, Loading
drivers/usb/gadget/epautoconf.c +7 −2 Original line number Diff line number Diff line Loading @@ -211,7 +211,7 @@ void usb_ep_autoconfig_reset (struct usb_gadget *gadget) EXPORT_SYMBOL_GPL(usb_ep_autoconfig_reset); /** * usb_ep_autoconfig_by_name - Used to pick the endpoint by name. eg ep1in-gsi * usb_ep_autoconfig_by_name - Used to pick the endpoint by name. eg gsi-epin1 * @gadget: The device to which the endpoint must belong. * @desc: Endpoint descriptor, with endpoint direction and transfer mode * initialized. Loading @@ -227,8 +227,12 @@ struct usb_ep *usb_ep_autoconfig_by_name( struct usb_ep *ep; bool ep_found = false; if (!ep_name || !strlen(ep_name)) goto err; list_for_each_entry(ep, &gadget->ep_list, ep_list) if (strcmp(ep->name, ep_name) == 0 && !ep->driver_data) { if (strncmp(ep->name, ep_name, strlen(ep_name)) == 0 && !ep->driver_data) { ep_found = true; break; } Loading @@ -243,6 +247,7 @@ struct usb_ep *usb_ep_autoconfig_by_name( return ep; } err: pr_err("%s:error finding ep %s\n", __func__, ep_name); return NULL; } Loading