linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: chengdong zhou <zhouscd@gmail.com>
Cc: dan.scally@ideasonboard.com, laurent.pinchart@ideasonboard.com,
	m.grzeschik@pengutronix.de, john@keeping.me.uk,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] USB: gadget: usb function sourcesink and loopback support usb configfs
Date: Fri, 4 Aug 2023 14:41:08 +0200	[thread overview]
Message-ID: <2023080449-traitor-tricolor-267b@gregkh> (raw)
In-Reply-To: <20230801104223.281275-1-zhouscd@gmail.com>

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@gmail.com>
> ---
>  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 :(


  reply	other threads:[~2023-08-04 12:41 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-01 10:42 [PATCH] USB: gadget: usb function sourcesink and loopback support usb configfs chengdong zhou
2023-08-04 12:41 ` Greg KH [this message]
2023-08-22 12:34 ` Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2023080449-traitor-tricolor-267b@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=dan.scally@ideasonboard.com \
    --cc=john@keeping.me.uk \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=m.grzeschik@pengutronix.de \
    --cc=zhouscd@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).