sysdev: Pass attribute in sysdev_class attributes show/store
Passing the attribute to the low level IO functions allows all kinds of cleanups, by sharing low level IO code without requiring an own function for every piece of data. Also drivers can extend the attributes with own data fields and use that in the low level function. Similar to sysdev_attributes and normal attributes. This is a tree-wide sweep, converting everything in one go. No functional changes in this patch other than passing the new argument everywhere. Tested on x86, the non x86 parts are uncompiled. Signed-off-by: Andi Kleen <ak@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:

committed by
Greg Kroah-Hartman

parent
3d03ba4d1d
commit
c9be0a36f9
@@ -41,8 +41,10 @@ struct sysdev_class {
|
||||
|
||||
struct sysdev_class_attribute {
|
||||
struct attribute attr;
|
||||
ssize_t (*show)(struct sysdev_class *, char *);
|
||||
ssize_t (*store)(struct sysdev_class *, const char *, size_t);
|
||||
ssize_t (*show)(struct sysdev_class *, struct sysdev_class_attribute *,
|
||||
char *);
|
||||
ssize_t (*store)(struct sysdev_class *, struct sysdev_class_attribute *,
|
||||
const char *, size_t);
|
||||
};
|
||||
|
||||
#define _SYSDEV_CLASS_ATTR(_name,_mode,_show,_store) \
|
||||
|
Reference in New Issue
Block a user