[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ADE657CA350FB648AAC2C43247A983F0020698A17CD0@AUSP01VMBX24.collaborationhost.net>
Date: Thu, 10 May 2012 17:31:36 -0500
From: H Hartley Sweeten <hartleys@...ionengravers.com>
To: Greg KH <gregkh@...uxfoundation.org>
CC: Linux Kernel <linux-kernel@...r.kernel.org>,
"devel@...verdev.osuosl.org" <devel@...verdev.osuosl.org>,
"fmhess@...rs.sourceforge.net" <fmhess@...rs.sourceforge.net>,
"abbotti@....co.uk" <abbotti@....co.uk>
Subject: RE: [PATCH v2] staging: comedi: refactor sysfs files in
comedi_fops.c
On Wednesday, May 09, 2012 1:39 PM, Greg KH wrote:
> On Wed, May 09, 2012 at 09:20:08AM -0700, H Hartley Sweeten wrote:
>> Refactor the sysfs attributes and functions to remove
>> the need for the forward declarations and use the
>> DEVICE_ATTR macro to define them.
>>
>> Instead of individually creating sysfs device attribute
>> files, wrap them in an attribute_group and use the
>> sysfs_create_group function to create them.
>
> This is great, and needed to be done, but you need to take this one step
> further. This attribute group needs to be registered by the driver
> core, not the comedi core, so userspace doesn't get an add event before
> the files are created. To do that, assign this attribute group to the
> class and the core will handle it for you.
>
> I've taken this patch, but will you make a follow-on patch that makes
> this change, which will remove this race? It should be a net removal of
> code in the comedi core overall.
>
I think I worked this out. Compile testing it now and will post the patch
shortly.
Regards,
Hartley
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists