Thread (4 messages) 4 messages, 2 authors, 2022-08-02

Re: [PATCH] Input: elan_i2c - convert to use dev_groups

From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Date: 2022-07-30 07:37:17
Also in: lkml

On Fri, Jul 29, 2022 at 11:43:03AM -0700, Dmitry Torokhov wrote:
Hi Greg,

On Fri, Jul 29, 2022 at 03:58:16PM +0200, Greg Kroah-Hartman wrote:
quoted
The driver core supports the ability to handle the creation and removal
of device-specific sysfs files in a race-free manner.  Take advantage of
that by converting this driver to use this by moving the sysfs
attributes into a group and assigning the dev_groups pointer to it.
I obviously like this patch as the less boilerplate code the better, but
I am not sure what race are you talking about in the commit message?
Could you please elaborate?
The race is normally because the device is announced to userspace before
the attributes are added.  But you are right, the race is still the same
here, the attributes are added after probe succeeds, so it's the same
time, so this changelog text is wrong, sorry about that.

I'll rewrite this to just say it's cleaner and simpler with this change
and resend it in a few days.

thanks,

greg k-h
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help