From: Greg KH <gregkh@linuxfoundation.org>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: linux-input@vger.kernel.org, usbb2k-api-dev@nongnu.org,
linux-kernel@vger.kernel.org,
Henk Vergonet <Henk.Vergonet@gmail.com>
Subject: Re: [PATCH 2/2] Input: yealink - simplify locking in sysfs attribute handling
Date: Thu, 11 Jul 2024 09:42:45 +0200 [thread overview]
Message-ID: <2024071141-fester-astronaut-96a6@gregkh> (raw)
In-Reply-To: <20240710234855.311366-2-dmitry.torokhov@gmail.com>
On Wed, Jul 10, 2024 at 04:48:54PM -0700, Dmitry Torokhov wrote:
> The locking rules in the driver came from era when sysfs attributes
> could live past the point of time when device would be unbound from
> the driver, and so used module-global semaphore (potentially shared
> between multiple yealink devices). Thankfully these times are long
> gone and attributes will not be accessible once they are removed.
>
> Simplify the logic by moving to per-device mutex, stop checking if
> there is driver data instance attached to the interface, and use
> guard notation to acquire the mutex.
>
> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
next prev parent reply other threads:[~2024-07-11 7:42 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-10 23:48 [PATCH 1/2] Input: yealink - use driver core to instantiate device attributes Dmitry Torokhov
2024-07-10 23:48 ` [PATCH 2/2] Input: yealink - simplify locking in sysfs attribute handling Dmitry Torokhov
2024-07-11 7:42 ` Greg KH [this message]
2024-07-11 7:42 ` [PATCH 1/2] Input: yealink - use driver core to instantiate device attributes 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=2024071141-fester-astronaut-96a6@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=Henk.Vergonet@gmail.com \
--cc=dmitry.torokhov@gmail.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=usbb2k-api-dev@nongnu.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).