diff options
author | Thomas Renninger <trenn@suse.de> | 2009-04-22 07:48:31 -0400 |
---|---|---|
committer | Dave Jones <davej@redhat.com> | 2009-06-15 11:49:41 -0400 |
commit | 4f4d1ad6ee69027f51f9d137f7e7d3c863cbc53d (patch) | |
tree | ce64f81a573ac07c78abb835a84bc59c31c9cb18 /drivers | |
parent | 86e13684aa77f07c77db352f437d9e53a84dde90 (diff) |
[CPUFREQ] Only set sampling_rate_max deprecated, sampling_rate_min is useful
Update the documentation accordingly.
Cleanup and use printk_once.
Signed-off-by: Thomas Renninger <trenn@suse.de>
Signed-off-by: Dave Jones <davej@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/cpufreq/cpufreq_conservative.c | 17 | ||||
-rw-r--r-- | drivers/cpufreq/cpufreq_ondemand.c | 18 |
2 files changed, 4 insertions, 31 deletions
diff --git a/drivers/cpufreq/cpufreq_conservative.c b/drivers/cpufreq/cpufreq_conservative.c index 06bfe1c572cd..7fc58af748b4 100644 --- a/drivers/cpufreq/cpufreq_conservative.c +++ b/drivers/cpufreq/cpufreq_conservative.c | |||
@@ -167,26 +167,13 @@ static struct notifier_block dbs_cpufreq_notifier_block = { | |||
167 | /************************** sysfs interface ************************/ | 167 | /************************** sysfs interface ************************/ |
168 | static ssize_t show_sampling_rate_max(struct cpufreq_policy *policy, char *buf) | 168 | static ssize_t show_sampling_rate_max(struct cpufreq_policy *policy, char *buf) |
169 | { | 169 | { |
170 | static int print_once; | 170 | printk_once(KERN_INFO "CPUFREQ: conservative sampling_rate_max " |
171 | 171 | "sysfs file is deprecated - used by: %s\n", current->comm); | |
172 | if (!print_once) { | ||
173 | printk(KERN_INFO "CPUFREQ: conservative sampling_rate_max " | ||
174 | "sysfs file is deprecated - used by: %s\n", | ||
175 | current->comm); | ||
176 | print_once = 1; | ||
177 | } | ||
178 | return sprintf(buf, "%u\n", -1U); | 172 | return sprintf(buf, "%u\n", -1U); |
179 | } | 173 | } |
180 | 174 | ||
181 | static ssize_t show_sampling_rate_min(struct cpufreq_policy *policy, char *buf) | 175 | static ssize_t show_sampling_rate_min(struct cpufreq_policy *policy, char *buf) |
182 | { | 176 | { |
183 | static int print_once; | ||
184 | |||
185 | if (!print_once) { | ||
186 | printk(KERN_INFO "CPUFREQ: conservative sampling_rate_max " | ||
187 | "sysfs file is deprecated - used by: %s\n", current->comm); | ||
188 | print_once = 1; | ||
189 | } | ||
190 | return sprintf(buf, "%u\n", min_sampling_rate); | 177 | return sprintf(buf, "%u\n", min_sampling_rate); |
191 | } | 178 | } |
192 | 179 | ||
diff --git a/drivers/cpufreq/cpufreq_ondemand.c b/drivers/cpufreq/cpufreq_ondemand.c index a235114c3d85..1911d1729353 100644 --- a/drivers/cpufreq/cpufreq_ondemand.c +++ b/drivers/cpufreq/cpufreq_ondemand.c | |||
@@ -205,27 +205,13 @@ static void ondemand_powersave_bias_init(void) | |||
205 | /************************** sysfs interface ************************/ | 205 | /************************** sysfs interface ************************/ |
206 | static ssize_t show_sampling_rate_max(struct cpufreq_policy *policy, char *buf) | 206 | static ssize_t show_sampling_rate_max(struct cpufreq_policy *policy, char *buf) |
207 | { | 207 | { |
208 | static int print_once; | 208 | printk_once(KERN_INFO "CPUFREQ: ondemand sampling_rate_max " |
209 | 209 | "sysfs file is deprecated - used by: %s\n", current->comm); | |
210 | if (!print_once) { | ||
211 | printk(KERN_INFO "CPUFREQ: ondemand sampling_rate_max " | ||
212 | "sysfs file is deprecated - used by: %s\n", | ||
213 | current->comm); | ||
214 | print_once = 1; | ||
215 | } | ||
216 | return sprintf(buf, "%u\n", -1U); | 210 | return sprintf(buf, "%u\n", -1U); |
217 | } | 211 | } |
218 | 212 | ||
219 | static ssize_t show_sampling_rate_min(struct cpufreq_policy *policy, char *buf) | 213 | static ssize_t show_sampling_rate_min(struct cpufreq_policy *policy, char *buf) |
220 | { | 214 | { |
221 | static int print_once; | ||
222 | |||
223 | if (!print_once) { | ||
224 | printk(KERN_INFO "CPUFREQ: ondemand sampling_rate_min " | ||
225 | "sysfs file is deprecated - used by: %s\n", | ||
226 | current->comm); | ||
227 | print_once = 1; | ||
228 | } | ||
229 | return sprintf(buf, "%u\n", min_sampling_rate); | 215 | return sprintf(buf, "%u\n", min_sampling_rate); |
230 | } | 216 | } |
231 | 217 | ||