aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/device.h
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2019-07-31 08:43:40 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-08-02 06:37:53 -0400
commit23b6904442d08b7dbed7622ed33b236d41a3aa8b (patch)
treef3c71b34f37aed14893b32fe783d098255f20b03 /include/linux/device.h
parent5f9e832c137075045d15cd6899ab0505cfb2ca4b (diff)
driver core: add dev_groups to all drivers
Add 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. Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Tested-by: Richard Gong <richard.gong@linux.intel.com> Link: https://lore.kernel.org/r/20190731124349.4474-2-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/device.h')
-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 c330b75c6c57..98c00b71b598 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -262,6 +262,8 @@ enum probe_type {
262 * @resume: Called to bring a device from sleep mode. 262 * @resume: Called to bring a device from sleep mode.
263 * @groups: Default attributes that get created by the driver core 263 * @groups: Default attributes that get created by the driver core
264 * automatically. 264 * automatically.
265 * @dev_groups: Additional attributes attached to device instance once the
266 * it is bound to the driver.
265 * @pm: Power management operations of the device which matched 267 * @pm: Power management operations of the device which matched
266 * this driver. 268 * this driver.
267 * @coredump: Called when sysfs entry is written to. The device driver 269 * @coredump: Called when sysfs entry is written to. The device driver
@@ -296,6 +298,7 @@ struct device_driver {
296 int (*suspend) (struct device *dev, pm_message_t state); 298 int (*suspend) (struct device *dev, pm_message_t state);
297 int (*resume) (struct device *dev); 299 int (*resume) (struct device *dev);
298 const struct attribute_group **groups; 300 const struct attribute_group **groups;
301 const struct attribute_group **dev_groups;
299 302
300 const struct dev_pm_ops *pm; 303 const struct dev_pm_ops *pm;
301 void (*coredump) (struct device *dev); 304 void (*coredump) (struct device *dev);