mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
driver core: add default groups to struct class
We should be using groups, not attribute lists, for classes to allow subdirectories, and soon, binary files. Groups are just more flexible overall, so add them. The dev_attrs list will go away after all in-kernel users are converted to use dev_groups. Reviewed-by: Guenter Roeck <linux@roeck-us.net> Tested-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
39ef311204
commit
d05a6f96c7
2 changed files with 11 additions and 2 deletions
|
@ -320,6 +320,7 @@ int subsys_virtual_register(struct bus_type *subsys,
|
|||
* @name: Name of the class.
|
||||
* @owner: The module owner.
|
||||
* @class_attrs: Default attributes of this class.
|
||||
* @dev_groups: Default attributes of the devices that belong to the class.
|
||||
* @dev_attrs: Default attributes of the devices belong to the class.
|
||||
* @dev_bin_attrs: Default binary attributes of the devices belong to the class.
|
||||
* @dev_kobj: The kobject that represents this class and links it into the hierarchy.
|
||||
|
@ -349,7 +350,8 @@ struct class {
|
|||
struct module *owner;
|
||||
|
||||
struct class_attribute *class_attrs;
|
||||
struct device_attribute *dev_attrs;
|
||||
struct device_attribute *dev_attrs; /* use dev_groups instead */
|
||||
const struct attribute_group **dev_groups;
|
||||
struct bin_attribute *dev_bin_attrs;
|
||||
struct kobject *dev_kobj;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue