linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Ivan Orlov <ivan.orlov0322@gmail.com>
Cc: linux-usb@vger.kernel.org
Subject: Re: [PATCH 6/6] USB: file.c: make usb class a static const structure
Date: Wed, 21 Jun 2023 15:29:23 +0200	[thread overview]
Message-ID: <2023062110-portfolio-partner-d010@gregkh> (raw)
In-Reply-To: <abc79c1b-f12e-50fc-5351-b62462125c57@gmail.com>

On Wed, Jun 21, 2023 at 05:06:34PM +0400, Ivan Orlov wrote:
> On 6/21/23 16:48, Greg Kroah-Hartman wrote:
> > I think we should make it simpler, allocate the class when we start up,
> > and free it when we shut down, which guarantees that all users of the
> > class are removed at that time as this is part of the usb core code.
> > 
> > No need to be fancy anymore with the dynamic creation/removal of the
> > class, it's just not worth it :)
> > 
> > thanks,
> > 
> > greg k-h
> 
> Alright, it sounds really reasonable, let's do it in this way :)
> 
> I'll add init_usb_class call to the 'usb_init' function and the
> corresponding releasing function call to the 'usb_exit' function in the
> 'drivers/usb/core/usb.c' file. So we would register class at startup and
> unregister it when shutting down.
> 

Totally reasonable, thanks for doing this work.

greg k-h

      reply	other threads:[~2023-06-21 13:29 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-20  9:44 [PATCH 1/6] USB: roles: make role_class a static const structure Greg Kroah-Hartman
2023-06-20  9:44 ` [PATCH 2/6] USB: gadget: udc: core: make udc_class " Greg Kroah-Hartman
2023-06-20  9:44 ` [PATCH 3/6] USB: mon: make mon_bin_class " Greg Kroah-Hartman
2023-06-20  9:44 ` [PATCH 4/6] USB: gadget: f_printer: make usb_gadget_class " Greg Kroah-Hartman
2023-06-20  9:44 ` [PATCH 5/6] USB: gadget: f_hid: make hidg_class " Greg Kroah-Hartman
2023-06-20  9:44 ` [PATCH 6/6] USB: file.c: make usb class " Greg Kroah-Hartman
2023-06-20 14:22   ` Greg Kroah-Hartman
2023-06-21 11:08     ` Ivan Orlov
2023-06-21 12:48       ` Greg Kroah-Hartman
2023-06-21 13:06         ` Ivan Orlov
2023-06-21 13:29           ` Greg Kroah-Hartman [this message]

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=2023062110-portfolio-partner-d010@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=ivan.orlov0322@gmail.com \
    --cc=linux-usb@vger.kernel.org \
    /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).