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 /drivers/cpuidle | |
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 'drivers/cpuidle')
-rw-r--r-- | drivers/cpuidle/sysfs.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/cpuidle/sysfs.c b/drivers/cpuidle/sysfs.c index 97b003839fb6..c9cefacabf37 100644 --- a/drivers/cpuidle/sysfs.c +++ b/drivers/cpuidle/sysfs.c | |||
@@ -22,6 +22,7 @@ static int __init cpuidle_sysfs_setup(char *unused) | |||
22 | __setup("cpuidle_sysfs_switch", cpuidle_sysfs_setup); | 22 | __setup("cpuidle_sysfs_switch", cpuidle_sysfs_setup); |
23 | 23 | ||
24 | static ssize_t show_available_governors(struct sysdev_class *class, | 24 | static ssize_t show_available_governors(struct sysdev_class *class, |
25 | struct sysdev_class_attribute *attr, | ||
25 | char *buf) | 26 | char *buf) |
26 | { | 27 | { |
27 | ssize_t i = 0; | 28 | ssize_t i = 0; |
@@ -41,6 +42,7 @@ out: | |||
41 | } | 42 | } |
42 | 43 | ||
43 | static ssize_t show_current_driver(struct sysdev_class *class, | 44 | static ssize_t show_current_driver(struct sysdev_class *class, |
45 | struct sysdev_class_attribute *attr, | ||
44 | char *buf) | 46 | char *buf) |
45 | { | 47 | { |
46 | ssize_t ret; | 48 | ssize_t ret; |
@@ -56,6 +58,7 @@ static ssize_t show_current_driver(struct sysdev_class *class, | |||
56 | } | 58 | } |
57 | 59 | ||
58 | static ssize_t show_current_governor(struct sysdev_class *class, | 60 | static ssize_t show_current_governor(struct sysdev_class *class, |
61 | struct sysdev_class_attribute *attr, | ||
59 | char *buf) | 62 | char *buf) |
60 | { | 63 | { |
61 | ssize_t ret; | 64 | ssize_t ret; |
@@ -71,6 +74,7 @@ static ssize_t show_current_governor(struct sysdev_class *class, | |||
71 | } | 74 | } |
72 | 75 | ||
73 | static ssize_t store_current_governor(struct sysdev_class *class, | 76 | static ssize_t store_current_governor(struct sysdev_class *class, |
77 | struct sysdev_class_attribute *attr, | ||
74 | const char *buf, size_t count) | 78 | const char *buf, size_t count) |
75 | { | 79 | { |
76 | char gov_name[CPUIDLE_NAME_LEN]; | 80 | char gov_name[CPUIDLE_NAME_LEN]; |