[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>
This commit is contained in:

committed by
Dave Jones

parent
86e13684aa
commit
4f4d1ad6ee
@@ -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);
|
||||
}
|
||||
|
||||
|
@@ -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);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user