diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2017-07-19 17:24:31 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-07-22 11:59:23 +0200 |
commit | a7670d425b75f9e44b7d4d0aea04f4a6d5f34291 (patch) | |
tree | dc9ebc90e421d03e3d0ae03134f3aa9b1fc94442 /include | |
parent | 1455cf8dbfd06aa7651dcfccbadb7a093944ca65 (diff) | |
download | linux-a7670d425b75f9e44b7d4d0aea04f4a6d5f34291.tar.bz2 |
driver core: make device_{add|remove}_groups() public
Many drivers create additional driver-specific device attributes when
binding to the device. To avoid them calling SYSFS API directly, let's
export these helpers.
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/device.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/device.h b/include/linux/device.h index 9ef518af5515..10cf209a4e82 100644 --- a/include/linux/device.h +++ b/include/linux/device.h @@ -1200,6 +1200,11 @@ struct device *device_create_with_groups(struct class *cls, const char *fmt, ...); extern void device_destroy(struct class *cls, dev_t devt); +extern int __must_check device_add_groups(struct device *dev, + const struct attribute_group **groups); +extern void device_remove_groups(struct device *dev, + const struct attribute_group **groups); + /* * Platform "fixup" functions - allow the platform to have their say * about devices and actions that the general device layer doesn't |