From: Ivan Orlov <ivan.orlov0322@gmail.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
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:08:07 +0400 [thread overview]
Message-ID: <33236558-8987-0b84-bef0-613fec01f965@gmail.com> (raw)
In-Reply-To: <2023062000-consuming-crusher-8a92@gregkh>
On 20.06.2023 18:22, Greg Kroah-Hartman wrote:
> Is this structure needed anymore at all now that the thing the kref was
> "protecting" is gone? I think it can be dropped entirely, right?
>
> thanks,
>
> greg k-h
As I understood after reading the code, this kref is used for checking
how many devices uses our class and testing when we can unregister it.
As we register our class only when the first device is registered, I
think the best solution is to move this kref structure out of the
usb_class structure as we still need it for detecting when we could
finally unregister our class. What do you think about it?
next prev parent reply other threads:[~2023-06-21 11:08 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 [this message]
2023-06-21 12:48 ` Greg Kroah-Hartman
2023-06-21 13:06 ` Ivan Orlov
2023-06-21 13:29 ` Greg Kroah-Hartman
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=33236558-8987-0b84-bef0-613fec01f965@gmail.com \
--to=ivan.orlov0322@gmail.com \
--cc=gregkh@linuxfoundation.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.