From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Guenter Roeck <linux@roeck-us.net>
Cc: Jean Delvare <khali@linux-fr.org>,
lm-sensors@lm-sensors.org, linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH 0/5] Introduce and use device_create_groups
Date: Sat, 6 Jul 2013 10:33:47 -0700 [thread overview]
Message-ID: <20130706173347.GA7902@kroah.com> (raw)
In-Reply-To: <1373131495-13465-1-git-send-email-linux@roeck-us.net>
On Sat, Jul 06, 2013 at 10:24:50AM -0700, Guenter Roeck wrote:
> This patch series introduces the new driver core API function
> device_create_groups().
>
> device_create_groups() lets callers create devices as well as associated
> sysfs attributes with a single call. This avoids potential race conditions
> seen if sysfs attributes on new devices are created later.
>
> The rationale for the new API is that sysfs attributes should be created
> synchronously with device creation to avoid race conditions, as outlined in
> http://www.linuxfoundation.org/news-media/blogs/browse/2013/06/how-create-sysfs-file-correctly.
>
> Unfortunately, the only API function to create a device dynamically is
> device_create, which does not support the notion of adding sysfs attributes
> when creating a device. The new API call is similar but lets the caller provide
> a list of sysfs attribute groups.
What's wrong with the default attribute groups that all devices, busses,
and classes can define to be properly created when the device is added
to the driver core? How does that not already provide this
functionality?
greg k-h
next prev parent reply other threads:[~2013-07-06 17:32 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-06 17:24 [RFC PATCH 0/5] Introduce and use device_create_groups Guenter Roeck
2013-07-06 17:24 ` [RFC PATCH 1/5] driver core: Introduce device_create_groups Guenter Roeck
2013-07-06 17:47 ` Greg Kroah-Hartman
2013-07-06 19:22 ` Guenter Roeck
2013-07-06 17:24 ` [RFC PATCH 2/5] hwmon: Introduce hwmon_device_register_groups Guenter Roeck
2013-07-06 17:24 ` [RFC PATCH 3/5] hwmon: (ds1621) Convert to use hwmon_device_register_groups Guenter Roeck
2013-07-06 17:57 ` Greg Kroah-Hartman
2013-07-06 18:01 ` Jean Delvare
2013-07-06 19:18 ` Guenter Roeck
2013-07-06 19:31 ` Greg Kroah-Hartman
2013-07-06 19:48 ` Guenter Roeck
2013-07-06 19:59 ` Jean Delvare
2013-07-06 20:14 ` Guenter Roeck
2013-07-06 19:54 ` Jean Delvare
2013-07-06 20:45 ` Guenter Roeck
2013-07-06 17:24 ` [RFC PATCH 4/5] hwmon: (gpio-fan) " Guenter Roeck
2013-07-06 17:24 ` [RFC PATCH 5/5] hwmon: (ltc4245) " Guenter Roeck
2013-07-06 17:33 ` Greg Kroah-Hartman [this message]
-- strict thread matches above, loose matches on Subject: below --
2013-07-06 17:23 [RFC PATCH 0/5] Introduce and use device_create_groups Guenter Roeck
2013-07-06 17:22 Guenter Roeck
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=20130706173347.GA7902@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=khali@linux-fr.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=lm-sensors@lm-sensors.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