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 /arch/mips | |
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 'arch/mips')
-rw-r--r-- | arch/mips/txx9/generic/7segled.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/mips/txx9/generic/7segled.c b/arch/mips/txx9/generic/7segled.c index 727ab21b6618..7f8416f86222 100644 --- a/arch/mips/txx9/generic/7segled.c +++ b/arch/mips/txx9/generic/7segled.c | |||
@@ -58,13 +58,16 @@ static ssize_t raw_store(struct sys_device *dev, | |||
58 | static SYSDEV_ATTR(ascii, 0200, NULL, ascii_store); | 58 | static SYSDEV_ATTR(ascii, 0200, NULL, ascii_store); |
59 | static SYSDEV_ATTR(raw, 0200, NULL, raw_store); | 59 | static SYSDEV_ATTR(raw, 0200, NULL, raw_store); |
60 | 60 | ||
61 | static ssize_t map_seg7_show(struct sysdev_class *class, char *buf) | 61 | static ssize_t map_seg7_show(struct sysdev_class *class, |
62 | struct sysdev_class_attribute *attr, | ||
63 | char *buf) | ||
62 | { | 64 | { |
63 | memcpy(buf, &txx9_seg7map, sizeof(txx9_seg7map)); | 65 | memcpy(buf, &txx9_seg7map, sizeof(txx9_seg7map)); |
64 | return sizeof(txx9_seg7map); | 66 | return sizeof(txx9_seg7map); |
65 | } | 67 | } |
66 | 68 | ||
67 | static ssize_t map_seg7_store(struct sysdev_class *class, | 69 | static ssize_t map_seg7_store(struct sysdev_class *class, |
70 | struct sysdev_class_attribute *attr, | ||
68 | const char *buf, size_t size) | 71 | const char *buf, size_t size) |
69 | { | 72 | { |
70 | if (size != sizeof(txx9_seg7map)) | 73 | if (size != sizeof(txx9_seg7map)) |