staging: comedi: register sysfs device attributes with driver core
authorH Hartley Sweeten <hartleys@visionengravers.com>
Fri, 11 May 2012 01:05:28 +0000 (18:05 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 14 May 2012 20:00:55 +0000 (13:00 -0700)
commitfb60367d5dff0e2ee3032f7daf212e5ed9863552
tree8b623e0fac2c58dbbc0a40e7fbad0588f182680c
parentd3b487695120b5342067244253697eabb121436d
staging: comedi: register sysfs device attributes with driver core

Currently the sysfs device attributes are created by the comedi
core after each comedi device is created. This can lead to a race
condition where userspace gets an add event before the files are
created.

Register the device attributes with the comedi class so that the
driver core handles creating them and we avoid the race.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/comedi_fops.c