mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
[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 <[email protected]> Signed-off-by: Dave Jones <[email protected]>
This commit is contained in:
parent
86e13684aa
commit
4f4d1ad6ee
3 changed files with 18 additions and 43 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue