lkml.org 
[lkml]   [2012]   [May]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2] staging: comedi: refactor sysfs files in comedi_fops.c
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.

thanks,

greg k-h


\
 
 \ /
  Last update: 2012-05-09 23:01    [W:0.044 / U:0.352 seconds]
©2003-2014 Jasper Spaans. Advertise on this site