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>
This commit is contained in:

committed by
Greg Kroah-Hartman

parent
1455cf8dbf
commit
a7670d425b
@@ -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
|
||||
|
Reference in New Issue
Block a user