Re: [PATCH 2/2] usb: dwc3: gadget: Remove descriptor arguments to ep_config
Hi, John Youn writes: > This function has access to the descriptors via the usb_ep. > > Signed-off-by: John Youn > --- > drivers/usb/dwc3/gadget.c | 9 ++--- > 1 file changed, 6 insertions(+), 3 deletions(-) > > diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c > index 0e73383..4914182 100644 > --- a/drivers/usb/dwc3/gadget.c > +++ b/drivers/usb/dwc3/gadget.c > @@ -488,16 +488,19 @@ static int dwc3_gadget_start_config(struct dwc3 *dwc, > struct dwc3_ep *dep) > } > > static int dwc3_gadget_set_ep_config(struct dwc3 *dwc, struct dwc3_ep *dep, > - const struct usb_endpoint_descriptor *desc, > - const struct usb_ss_ep_comp_descriptor *comp_desc, > bool modify, bool restore) > { > struct dwc3_gadget_ep_cmd_params params; > + const struct usb_endpoint_descriptor *desc; > + const struct usb_ss_ep_comp_descriptor *comp_desc; > > if (dev_WARN_ONCE(dwc->dev, modify && restore, > "Can't modify and restore\n")) > return -EINVAL; > > + desc = dep->endpoint.desc; > + comp_desc = dep->endpoint.comp_desc; > + > memset(¶ms, 0x00, sizeof(params)); > > params.param0 = DWC3_DEPCFG_EP_TYPE(usb_endpoint_type(desc)) > @@ -592,7 +595,7 @@ static int __dwc3_gadget_ep_enable(struct dwc3_ep *dep, > > ep = &dep->endpoint; > desc = ep->desc; > - ret = dwc3_gadget_set_ep_config(dwc, dep, desc, ep->comp_desc, > + ret = dwc3_gadget_set_ep_config(dwc, dep, > modify, restore); oh I see, you split into two patches :-) -- balbi signature.asc Description: PGP signature
[PATCH 2/2] usb: dwc3: gadget: Remove descriptor arguments to ep_config
This function has access to the descriptors via the usb_ep. Signed-off-by: John Youn --- drivers/usb/dwc3/gadget.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index 0e73383..4914182 100644 --- a/drivers/usb/dwc3/gadget.c +++ b/drivers/usb/dwc3/gadget.c @@ -488,16 +488,19 @@ static int dwc3_gadget_start_config(struct dwc3 *dwc, struct dwc3_ep *dep) } static int dwc3_gadget_set_ep_config(struct dwc3 *dwc, struct dwc3_ep *dep, - const struct usb_endpoint_descriptor *desc, - const struct usb_ss_ep_comp_descriptor *comp_desc, bool modify, bool restore) { struct dwc3_gadget_ep_cmd_params params; + const struct usb_endpoint_descriptor *desc; + const struct usb_ss_ep_comp_descriptor *comp_desc; if (dev_WARN_ONCE(dwc->dev, modify && restore, "Can't modify and restore\n")) return -EINVAL; + desc = dep->endpoint.desc; + comp_desc = dep->endpoint.comp_desc; + memset(¶ms, 0x00, sizeof(params)); params.param0 = DWC3_DEPCFG_EP_TYPE(usb_endpoint_type(desc)) @@ -592,7 +595,7 @@ static int __dwc3_gadget_ep_enable(struct dwc3_ep *dep, ep = &dep->endpoint; desc = ep->desc; - ret = dwc3_gadget_set_ep_config(dwc, dep, desc, ep->comp_desc, + ret = dwc3_gadget_set_ep_config(dwc, dep, modify, restore); if (ret) return ret; -- 2.10.0 -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html