History

driver core: Introduce device_create_groups

device_create_groups lets callers create devices as well as associated sysfs attributes with a single call. This avoids race conditions seen if sysfs attributes on new devices are created later. [fixed up comment block placement and add checks for printk buffer formats - gregkh]

Guenter Roeck committed 13 years ago

Commit 39ef3111 parent 388a8c32 files · +88 −28Browse files

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

Unified · Split

include/linux/device.h+5−0
@@ -938,6 +938,11 @@ extern __printf(5, 6) · 937 unmodified lines
938struct device *device_create(struct class *cls, struct device *parent,938struct device *device_create(struct class *cls, struct device *parent,
939 dev_t devt, void *drvdata,939 dev_t devt, void *drvdata,
940 const char *fmt, ...);940 const char *fmt, ...);
941extern __printf(6, 7)
942struct device *device_create_with_groups(struct class *cls,
943 struct device *parent, dev_t devt, void *drvdata,
944 const struct attribute_group **groups,
945 const char *fmt, ...);
941extern void device_destroy(struct class *cls, dev_t devt);946extern void device_destroy(struct class *cls, dev_t devt);
942 947
943/*948/*