Re: [PATCH 2/2] usb: dwc3: gadget: Remove descriptor arguments to ep_config

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

John Youn <johnyoun@xxxxxxxxxxxx> writes:
> This function has access to the descriptors via the usb_ep.
>
> Signed-off-by: John Youn <johnyoun@xxxxxxxxxxxx>
> ---
>  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(&params, 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

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux