Re: [PATCH] Input: elan_i2c - convert to use dev_groups
From: Greg Kroah-Hartman
Date: Sat Jul 30 2022 - 03:37:26 EST
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:
> > 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