diff options
author | Thomas Renninger <trenn@suse.de> | 2009-04-22 13:48:31 +0200 |
---|---|---|
committer | Dave Jones <davej@redhat.com> | 2009-06-15 11:49:41 -0400 |
commit | 4f4d1ad6ee69027f51f9d137f7e7d3c863cbc53d (patch) | |
tree | ce64f81a573ac07c78abb835a84bc59c31c9cb18 /drivers | |
parent | 86e13684aa77f07c77db352f437d9e53a84dde90 (diff) | |
download | op-kernel-dev-4f4d1ad6ee69027f51f9d137f7e7d3c863cbc53d.zip op-kernel-dev-4f4d1ad6ee69027f51f9d137f7e7d3c863cbc53d.tar.gz |
[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 06bfe1c..7fc58af 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 = { /************************** sysfs interface ************************/ static ssize_t show_sampling_rate_max(struct cpufreq_policy *policy, char *buf) { - static int print_once; - - if (!print_once) { - printk(KERN_INFO "CPUFREQ: conservative sampling_rate_max " - "sysfs file is deprecated - used by: %s\n", - current->comm); - print_once = 1; - } + printk_once(KERN_INFO "CPUFREQ: conservative sampling_rate_max " + "sysfs file is deprecated - used by: %s\n", current->comm); return sprintf(buf, "%u\n", -1U); } static ssize_t show_sampling_rate_min(struct cpufreq_policy *policy, char *buf) { - static int print_once; - - if (!print_once) { - printk(KERN_INFO "CPUFREQ: conservative sampling_rate_max " - "sysfs file is deprecated - used by: %s\n", current->comm); - print_once = 1; - } return sprintf(buf, "%u\n", min_sampling_rate); } diff --git a/drivers/cpufreq/cpufreq_ondemand.c b/drivers/cpufreq/cpufreq_ondemand.c index a235114..1911d17 100644 --- a/drivers/cpufreq/cpufreq_ondemand.c +++ b/drivers/cpufreq/cpufreq_ondemand.c @@ -205,27 +205,13 @@ static void ondemand_powersave_bias_init(void) /************************** sysfs interface ************************/ static ssize_t show_sampling_rate_max(struct cpufreq_policy *policy, char *buf) { - static int print_once; - - if (!print_once) { - printk(KERN_INFO "CPUFREQ: ondemand sampling_rate_max " - "sysfs file is deprecated - used by: %s\n", - current->comm); - print_once = 1; - } + printk_once(KERN_INFO "CPUFREQ: ondemand sampling_rate_max " + "sysfs file is deprecated - used by: %s\n", current->comm); return sprintf(buf, "%u\n", -1U); } static ssize_t show_sampling_rate_min(struct cpufreq_policy *policy, char *buf) { - static int print_once; - - if (!print_once) { - printk(KERN_INFO "CPUFREQ: ondemand sampling_rate_min " - "sysfs file is deprecated - used by: %s\n", - current->comm); - print_once = 1; - } return sprintf(buf, "%u\n", min_sampling_rate); } |