]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
driver core: Introduce device_create_groups
authorGuenter Roeck <linux@roeck-us.net>
Sun, 14 Jul 2013 23:05:57 +0000 (16:05 -0700)
committerZefan Li <lizefan@huawei.com>
Tue, 14 Apr 2015 09:33:53 +0000 (17:33 +0800)
commit4ef74f7a57f95fa31db9d415c5dee165e7c4875c
tree5dbfd93b032ce6b3127f002eb293275468e1dc09
parentaa12b754cfbd5b5c900d43a6a215b096d8afc0ee
driver core: Introduce device_create_groups

commit 39ef311204941ddd01ea2950d6220c8ccc710d15 upstream.

device_create_groups lets callers create devices as well as associated
sysfs attributes with a single call. This avoids race conditions seen
if sysfs attributes on new devices are created later.

[fixed up comment block placement and add checks for printk buffer
formats - gregkh]

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Cc: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
[lizf: Backported to 3.4: adjust context]
Signed-off-by: Zefan Li <lizefan@huawei.com>
drivers/base/core.c
include/linux/device.h