History

Merge tag 'dev_groups_all_drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core into usb-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.

Greg Kroah-Hartman committed 7 years ago

Commit c5d16532 parents 582ee9c 23b69042 files · +17 −0Browse files

Showing the changes to include/linux (1 of 2 files). Show all

Unified · Split

include/linux/device.h+3−0
@@ -262,6 +262,8 @@ enum probe_type { · 261 unmodified lines
262262 * @resume: Called to bring a device from sleep mode.
263263 * @groups: Default attributes that get created by the driver core
264264 * automatically.
265+ * @dev_groups: Additional attributes attached to device instance once the
266+ * it is bound to the driver.
265267 * @pm: Power management operations of the device which matched
266268 * this driver.
267269 * @coredump: Called when sysfs entry is written to. The device driver
@@ -296,6 +298,7 @@ struct device_driver { · 28 unmodified lines
296298 int (*suspend) (struct device *dev, pm_message_t state);
297299 int (*resume) (struct device *dev);
298300 const struct attribute_group **groups;
301+ const struct attribute_group **dev_groups;
299302
300303 const struct dev_pm_ops *pm;
301304 void (*coredump) (struct device *dev);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t