diff options
author | Andi Kleen <andi@firstfloor.org> | 2010-01-05 06:47:58 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-03-07 20:04:47 -0500 |
commit | c9be0a36f9bf392a7984473124a67a12964df11f (patch) | |
tree | 23fcf49f277d9a093b2b29831811219410ad7b05 /include/linux/sysdev.h | |
parent | 3d03ba4d1dd2246adff5a9ff1194a539b3bc05a7 (diff) |
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>
Diffstat (limited to 'include/linux/sysdev.h')
-rw-r--r-- | include/linux/sysdev.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/include/linux/sysdev.h b/include/linux/sysdev.h index f395bb3fa2f2..c2458fa8376c 100644 --- a/include/linux/sysdev.h +++ b/include/linux/sysdev.h | |||
@@ -41,8 +41,10 @@ struct sysdev_class { | |||
41 | 41 | ||
42 | struct sysdev_class_attribute { | 42 | struct sysdev_class_attribute { |
43 | struct attribute attr; | 43 | struct attribute attr; |
44 | ssize_t (*show)(struct sysdev_class *, char *); | 44 | ssize_t (*show)(struct sysdev_class *, struct sysdev_class_attribute *, |
45 | ssize_t (*store)(struct sysdev_class *, const char *, size_t); | 45 | char *); |
46 | ssize_t (*store)(struct sysdev_class *, struct sysdev_class_attribute *, | ||
47 | const char *, size_t); | ||
46 | }; | 48 | }; |
47 | 49 | ||
48 | #define _SYSDEV_CLASS_ATTR(_name,_mode,_show,_store) \ | 50 | #define _SYSDEV_CLASS_ATTR(_name,_mode,_show,_store) \ |