mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-05 13:51:52 +00:00
driver core: Use attribute groups in struct device_type
Driver core: use attribute groups in struct device_type Attribute groups are more flexible than attribute lists (an attribute list can be represented by anonymous group) so switch struct device_type to use them. Also rework attribute creation for devices so that they all cleaned up properly in case of errors. Signed-off-by: Dmitry Torokhov <dtor@mail.ru> Cc: Kay Sievers <kay.sievers@novell.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
b8c5cec23d
commit
621a1672f7
2 changed files with 72 additions and 49 deletions
|
@ -332,7 +332,7 @@ extern struct class_device *class_device_create(struct class *cls,
|
|||
extern void class_device_destroy(struct class *cls, dev_t devt);
|
||||
|
||||
struct device_type {
|
||||
struct device_attribute *attrs;
|
||||
struct attribute_group **groups;
|
||||
int (*uevent)(struct device *dev, char **envp, int num_envp,
|
||||
char *buffer, int buffer_size);
|
||||
void (*release)(struct device *dev);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue