/* -------------------------------------------------------------------------- */
-static int dwc3_gadget_init_hw_endpoints(struct dwc3 *dwc, u8 num)
+static int dwc3_gadget_init_endpoints(struct dwc3 *dwc, u8 num)
{
struct dwc3_ep *dep;
u8 epnum;
+ INIT_LIST_HEAD(&dwc->gadget.ep_list);
+
for (epnum = 0; epnum < num; epnum++) {
bool direction = epnum & 1;
return 0;
}
-static int dwc3_gadget_init_endpoints(struct dwc3 *dwc)
-{
- INIT_LIST_HEAD(&dwc->gadget.ep_list);
-
- return dwc3_gadget_init_hw_endpoints(dwc, dwc->num_eps);
-}
-
static void dwc3_gadget_free_endpoints(struct dwc3 *dwc)
{
struct dwc3_ep *dep;
* sure we're starting from a well known location.
*/
- ret = dwc3_gadget_init_endpoints(dwc);
+ ret = dwc3_gadget_init_endpoints(dwc, dwc->num_eps);
if (ret)
goto err6;