summaryrefslogtreecommitdiffstats
path: root/include/linux/device.h
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-11-28 10:41:41 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-11-29 15:12:12 -0500
commitced6473e7486702f530a49f886b73195e4977734 (patch)
treef4622f9caeccd1c86f340a86508287ff68670a1d /include/linux/device.h
parentb5a062344419baeeea0cc034fe5eef88a877190e (diff)
driver core: class: add class_groups support
struct class needs to have a set of default groups that are added, as adding individual attributes does not work well in the long run. So add support for that. Future patches will convert the existing usages of class_attrs to use class_groups and then class_attrs will go away. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/device.h')
-rw-r--r--include/linux/device.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/device.h b/include/linux/device.h
index 4264caacebb9..4cd8e52033b0 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -362,6 +362,7 @@ int subsys_virtual_register(struct bus_type *subsys,
362 * @name: Name of the class. 362 * @name: Name of the class.
363 * @owner: The module owner. 363 * @owner: The module owner.
364 * @class_attrs: Default attributes of this class. 364 * @class_attrs: Default attributes of this class.
365 * @class_groups: Default attributes of this class.
365 * @dev_groups: Default attributes of the devices that belong to the class. 366 * @dev_groups: Default attributes of the devices that belong to the class.
366 * @dev_kobj: The kobject that represents this class and links it into the hierarchy. 367 * @dev_kobj: The kobject that represents this class and links it into the hierarchy.
367 * @dev_uevent: Called when a device is added, removed from this class, or a 368 * @dev_uevent: Called when a device is added, removed from this class, or a
@@ -390,6 +391,7 @@ struct class {
390 struct module *owner; 391 struct module *owner;
391 392
392 struct class_attribute *class_attrs; 393 struct class_attribute *class_attrs;
394 const struct attribute_group **class_groups;
393 const struct attribute_group **dev_groups; 395 const struct attribute_group **dev_groups;
394 struct kobject *dev_kobj; 396 struct kobject *dev_kobj;
395 397