diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-07-14 19:05:58 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-07-16 13:57:37 -0400 |
commit | d05a6f96c76062b5f25858ac02cf677602076f7e (patch) | |
tree | 4c159b303e3e88c0a5e490f03619f2f7f7a2a859 /include | |
parent | 39ef311204941ddd01ea2950d6220c8ccc710d15 (diff) |
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>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/device.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/linux/device.h b/include/linux/device.h index bd5931e89f74..22b546a58591 100644 --- a/include/linux/device.h +++ b/include/linux/device.h | |||
@@ -320,6 +320,7 @@ int subsys_virtual_register(struct bus_type *subsys, | |||
320 | * @name: Name of the class. | 320 | * @name: Name of the class. |
321 | * @owner: The module owner. | 321 | * @owner: The module owner. |
322 | * @class_attrs: Default attributes of this class. | 322 | * @class_attrs: Default attributes of this class. |
323 | * @dev_groups: Default attributes of the devices that belong to the class. | ||
323 | * @dev_attrs: Default attributes of the devices belong to the class. | 324 | * @dev_attrs: Default attributes of the devices belong to the class. |
324 | * @dev_bin_attrs: Default binary attributes of the devices belong to the class. | 325 | * @dev_bin_attrs: Default binary attributes of the devices belong to the class. |
325 | * @dev_kobj: The kobject that represents this class and links it into the hierarchy. | 326 | * @dev_kobj: The kobject that represents this class and links it into the hierarchy. |
@@ -349,7 +350,8 @@ struct class { | |||
349 | struct module *owner; | 350 | struct module *owner; |
350 | 351 | ||
351 | struct class_attribute *class_attrs; | 352 | struct class_attribute *class_attrs; |
352 | struct device_attribute *dev_attrs; | 353 | struct device_attribute *dev_attrs; /* use dev_groups instead */ |
354 | const struct attribute_group **dev_groups; | ||
353 | struct bin_attribute *dev_bin_attrs; | 355 | struct bin_attribute *dev_bin_attrs; |
354 | struct kobject *dev_kobj; | 356 | struct kobject *dev_kobj; |
355 | 357 | ||