Re: [PATCH] USB: gadget: usb function sourcesink and loopback support usb configfs

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

 



On Tue, Aug 01, 2023 at 03:42:23AM -0700, chengdong zhou wrote:
> There are currently two issues that causes sourcesink and loopback to
> fail to export to usb configfs:
> 1. usb_function.name does not match usb_function_driver.name
> 2. usb configfs does not support function name with '/'
> 
> So, we adjusted usb_function.name to "sourcesink" and "loopback",
> and remove '/'
> 
> Signed-off-by: chengdong zhou <zhouscd@xxxxxxxxx>
> ---
>  drivers/usb/gadget/function/f_loopback.c   |  6 +++---
>  drivers/usb/gadget/function/f_sourcesink.c | 20 ++++++++++----------
>  drivers/usb/gadget/legacy/zero.c           |  6 +++---
>  3 files changed, 16 insertions(+), 16 deletions(-)
> 
> diff --git a/drivers/usb/gadget/function/f_loopback.c b/drivers/usb/gadget/function/f_loopback.c
> index ae41f556eb75..9900baa31c2d 100644
> --- a/drivers/usb/gadget/function/f_loopback.c
> +++ b/drivers/usb/gadget/function/f_loopback.c
> @@ -583,16 +583,16 @@ static struct usb_function_instance *loopback_alloc_instance(void)
>  
>  	return  &lb_opts->func_inst;
>  }
> -DECLARE_USB_FUNCTION(Loopback, loopback_alloc_instance, loopback_alloc);
> +DECLARE_USB_FUNCTION(loopback, loopback_alloc_instance, loopback_alloc);
>  
>  int __init lb_modinit(void)
>  {
> -	return usb_function_register(&Loopbackusb_func);
> +	return usb_function_register(&loopbackusb_func);
>  }
>  
>  void __exit lb_modexit(void)
>  {
> -	usb_function_unregister(&Loopbackusb_func);
> +	usb_function_unregister(&loopbackusb_func);
>  }
>  
>  MODULE_LICENSE("GPL");
> diff --git a/drivers/usb/gadget/function/f_sourcesink.c b/drivers/usb/gadget/function/f_sourcesink.c
> index 6803cd60cc6d..fc879b785ed0 100644
> --- a/drivers/usb/gadget/function/f_sourcesink.c
> +++ b/drivers/usb/gadget/function/f_sourcesink.c
> @@ -1,6 +1,6 @@
>  // SPDX-License-Identifier: GPL-2.0+
>  /*
> - * f_sourcesink.c - USB peripheral source/sink configuration driver
> + * f_sourcesink.c - USB peripheral sourcesink configuration driver

Why are documentation changes like this required?

This doesn't make sense :(




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

  Powered by Linux