sysfs: add support for binary attributes in groups
groups should be able to support binary attributes, just like it supports "normal" attributes. This lets us only handle one type of structure, groups, throughout the driver core and subsystems, making binary attributes a "full fledged" part of the driver model, and not something just "tacked on". Reported-by: Oliver Schinagl <oliver@schinagl.nl> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Tested-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
@@ -21,6 +21,7 @@
|
||||
|
||||
struct kobject;
|
||||
struct module;
|
||||
struct bin_attribute;
|
||||
enum kobj_ns_type;
|
||||
|
||||
struct attribute {
|
||||
@@ -59,10 +60,9 @@ struct attribute_group {
|
||||
umode_t (*is_visible)(struct kobject *,
|
||||
struct attribute *, int);
|
||||
struct attribute **attrs;
|
||||
struct bin_attribute **bin_attrs;
|
||||
};
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Use these macros to make defining attributes easier. See include/linux/device.h
|
||||
* for examples..
|
||||
|
Reference in New Issue
Block a user