From: Greg KH <gregkh@linuxfoundation.org>
To: H Hartley Sweeten <hartleys@visionengravers.com>
Cc: Linux Kernel <linux-kernel@vger.kernel.org>,
devel@driverdev.osuosl.org, fmhess@users.sourceforge.net,
abbotti@mev.co.uk
Subject: Re: [PATCH v2] staging: comedi: refactor sysfs files in comedi_fops.c
Date: Wed, 9 May 2012 13:39:16 -0700 [thread overview]
Message-ID: <20120509203916.GA16972@kroah.com> (raw)
In-Reply-To: <201205090920.09769.hartleys@visionengravers.com>
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
next prev parent reply other threads:[~2012-05-09 20:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-09 16:20 [PATCH v2] staging: comedi: refactor sysfs files in comedi_fops.c H Hartley Sweeten
2012-05-09 20:39 ` Greg KH [this message]
2012-05-10 22:31 ` H Hartley Sweeten
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120509203916.GA16972@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=abbotti@mev.co.uk \
--cc=devel@driverdev.osuosl.org \
--cc=fmhess@users.sourceforge.net \
--cc=hartleys@visionengravers.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox