From: Greg KH <gregkh@suse.de>
To: Eric Biederman <ebiederm@aristanetworks.com>
Cc: Stefan Achatz <stefan_achatz@web.de>,
"Serge E. Hallyn" <serue@us.ibm.com>, Tejun Heo <tj@kernel.org>,
Jiri Kosina <jkosina@suse.cz>,
linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
Dmitry Torokhov <dmitry.torokhov@gmail.com>,
Benjamin Thery <benjamin.thery@bull.net>
Subject: Re: [PATCH 2/2] HID: roccat: using new sysfs_create_bin_group() in kone driver
Date: Fri, 12 Nov 2010 16:52:32 -0800 [thread overview]
Message-ID: <20101113005232.GA20865@suse.de> (raw)
In-Reply-To: <AANLkTik4qPyBtKgJwHVnhkTASNORoKrWms6gk8NirYeU@mail.gmail.com>
On Fri, Nov 12, 2010 at 04:21:45PM -0800, Eric Biederman wrote:
> On Fri, Nov 12, 2010 at 10:18 AM, Stefan Achatz <stefan_achatz@web.de> wrote:
> > hid-roccat-kone now uses new group functions for creating binary
> > sysfs attributes.
>
> Looking at this, I have a problem with the way this works.
> You are still doing this the hard and racy way.
>
> sysfs attributes that are only added when we initialize the hardware and
> are only removed when we remove the driver should use the device layer
> functions to create their attributes.
>
> This achieves two things. The code is easier to write because there
> is less of it.
> The notification to user space happens after the attributes appear so
> that you don't
> have strange hotplug races.
>
> If there a chance you can look at implementing this in the simpler
> race free way?
Good point, just attach this attribute group to the device and the
driver core will automatically create the files for you.
thanks,
greg k-h
next prev parent reply other threads:[~2010-11-13 0:53 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-12 18:18 [PATCH 2/2] HID: roccat: using new sysfs_create_bin_group() in kone driver Stefan Achatz
2010-11-13 0:21 ` Eric Biederman
2010-11-13 0:52 ` Greg KH [this message]
2010-11-13 6:06 ` Dmitry Torokhov
2010-11-13 14:39 ` Greg KH
2010-11-13 16:34 ` Stefan Achatz
2010-11-14 0:03 ` Greg KH
-- strict thread matches above, loose matches on Subject: below --
2010-11-12 18:18 Stefan Achatz
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=20101113005232.GA20865@suse.de \
--to=gregkh@suse.de \
--cc=benjamin.thery@bull.net \
--cc=dmitry.torokhov@gmail.com \
--cc=ebiederm@aristanetworks.com \
--cc=jkosina@suse.cz \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=serue@us.ibm.com \
--cc=stefan_achatz@web.de \
--cc=tj@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.