summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2019-08-11 23:31:55 -0700
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2019-08-11 23:31:55 -0700
commit3281ddddc205012fa3484ddd3abdfaab781af000 (patch)
treee3dc034a2ecfd8e62e110f46cbb2822cd7e5babd /include
parent4aa31b4b61e4985e719352c329c3948d1932cb64 (diff)
parent23b6904442d08b7dbed7622ed33b236d41a3aa8b (diff)
downloadlinux-3281ddddc205012fa3484ddd3abdfaab781af000.tar.bz2
Merge tag 'dev_groups_all_drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core into next
dev_groups added to struct driver Persistent tag for others to pull this branch from This is the first patch in a longer series that adds the ability for the driver core to create and remove a list of attribute groups automatically when the device is bound/unbound from a specific driver. See: https://lore.kernel.org/r/20190731124349.4474-2-gregkh@linuxfoundation.org for details on this patch, and examples of how to use it in other drivers. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/device.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/device.h b/include/linux/device.h
index 6717adee33f0..47ccb2029bc3 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -262,6 +262,8 @@ enum probe_type {
* @resume: Called to bring a device from sleep mode.
* @groups: Default attributes that get created by the driver core
* automatically.
+ * @dev_groups: Additional attributes attached to device instance once the
+ * it is bound to the driver.
* @pm: Power management operations of the device which matched
* this driver.
* @coredump: Called when sysfs entry is written to. The device driver
@@ -296,6 +298,7 @@ struct device_driver {
int (*suspend) (struct device *dev, pm_message_t state);
int (*resume) (struct device *dev);
const struct attribute_group **groups;
+ const struct attribute_group **dev_groups;
const struct dev_pm_ops *pm;
void (*coredump) (struct device *dev);