[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <2024071141-fester-astronaut-96a6@gregkh>
Date: Thu, 11 Jul 2024 09:42:45 +0200
From: Greg KH <gregkh@...uxfoundation.org>
To: Dmitry Torokhov <dmitry.torokhov@...il.com>
Cc: linux-input@...r.kernel.org, usbb2k-api-dev@...gnu.org,
linux-kernel@...r.kernel.org,
Henk Vergonet <Henk.Vergonet@...il.com>
Subject: Re: [PATCH 2/2] Input: yealink - simplify locking in sysfs attribute
handling
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@...il.com>
Reviewed-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Powered by blists - more mailing lists