CPUFREQ: Move MIN/MAX to Kconfig
/drivers/cpufreq/cpufreq.c
blob:1bccb3f0c9010a659efcc039fac178d32f8b95e3 -> blob:949ed16a98306bff5cf99008b39a26d75896630b
--- drivers/cpufreq/cpufreq.c
+++ drivers/cpufreq/cpufreq.c
@@ -33,8 +33,6 @@
#include <trace/events/power.h>
#include <linux/semaphore.h>
-unsigned int thermal_max = 1512000;
-
#if !defined(__MP_DECISION_PATCH__)
#error "__MP_DECISION_PATCH__ must be defined in cpufreq.c"
#endif
@@ -445,20 +443,12 @@ static ssize_t show_##file_name \
return sprintf(buf, "%u\n", policy->object); \
}
-#define findmax( a, b ) ( ((a) > (b)) ? (a) : (b) )
-
show_one(cpuinfo_min_freq, cpuinfo.min_freq);
show_one(cpuinfo_max_freq, cpuinfo.max_freq);
show_one(cpuinfo_transition_latency, cpuinfo.transition_latency);
show_one(scaling_min_freq, min);
show_one(scaling_max_freq, max);
show_one(scaling_cur_freq, cur);
-
-static ssize_t show_thermal_max_freq(struct cpufreq_policy *policy, char *buf)
-{
- return sprintf(buf, "%u\n", thermal_max);
-}
-
#if defined(__MP_DECISION_PATCH__)
show_one(cpu_utilization, utils);
#endif
@@ -528,27 +518,12 @@ static ssize_t store_scaling_max_freq
cpufreq_set_limit_defered(USER_MAX_START, value);
}
- thermal_max = findmax(policy->max, thermal_max);
-
return count;
}
#else
store_one(scaling_min_freq, min);
store_one(scaling_max_freq, max);
#endif
-static ssize_t store_thermal_max_freq
- (struct cpufreq_policy *policy, const char *buf, size_t count)
-{
- unsigned int ret = -EINVAL;
- unsigned int value = 0;
-
- ret = sscanf(buf, "%u", &value);
- if (ret != 1)
- return -EINVAL;
-
- thermal_max = value;
- return count;
-}
/**
* show_cpuinfo_cur_freq - current CPU frequency as detected by hardware
@@ -795,14 +770,12 @@ cpufreq_freq_attr_rw(scaling_governor);
cpufreq_freq_attr_rw(scaling_setspeed);
#ifdef CONFIG_VDD_USERSPACE
-cpufreq_freq_attr_rw(thermal_max_freq);
define_one_global_rw(vdd_levels);
#endif
static struct attribute *default_attrs[] = {
&cpuinfo_min_freq.attr,
&cpuinfo_max_freq.attr,
- &thermal_max_freq.attr,
&cpuinfo_transition_latency.attr,
&scaling_min_freq.attr,
&scaling_max_freq.attr,