aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@linaro.org>2014-12-03 23:12:03 -0500
committerEduardo Valentin <edubezval@gmail.com>2014-12-08 13:08:05 -0500
commit97afa4aafb821eca197f678b6552488c46f8c48e (patch)
tree626891cf81081d2e6b823a44f630598d338c7cac
parentdcc6c7fdef9e705b1300be22213fb23e3fd1994d (diff)
thermal: cpu_cooling: get_property() doesn't need to support GET_MAXL anymore
We don't use get_property() to find max levels anymore as it is done at boot now. So, don't support GET_MAXL in get_property(). Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
-rw-r--r--drivers/thermal/cpu_cooling.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/drivers/thermal/cpu_cooling.c b/drivers/thermal/cpu_cooling.c
index d34cc5b27021..d2e6f845fe7d 100644
--- a/drivers/thermal/cpu_cooling.c
+++ b/drivers/thermal/cpu_cooling.c
@@ -116,7 +116,6 @@ static void release_idr(struct idr *idr, int id)
116enum cpufreq_cooling_property { 116enum cpufreq_cooling_property {
117 GET_LEVEL, 117 GET_LEVEL,
118 GET_FREQ, 118 GET_FREQ,
119 GET_MAXL,
120}; 119};
121 120
122/** 121/**
@@ -124,12 +123,11 @@ enum cpufreq_cooling_property {
124 * @cpu: cpu for which the property is required 123 * @cpu: cpu for which the property is required
125 * @input: query parameter 124 * @input: query parameter
126 * @output: query return 125 * @output: query return
127 * @property: type of query (frequency, level, max level) 126 * @property: type of query (frequency, level)
128 * 127 *
129 * This is the common function to 128 * This is the common function to
130 * 1. get maximum cpu cooling states 129 * 1. translate frequency to cooling state
131 * 2. translate frequency to cooling state 130 * 2. translate cooling state to frequency
132 * 3. translate cooling state to frequency
133 * 131 *
134 * Note that the code may be not in good shape 132 * Note that the code may be not in good shape
135 * but it is written in this way in order to: 133 * but it is written in this way in order to:
@@ -176,12 +174,6 @@ static int get_property(unsigned int cpu, unsigned long input,
176 /* max_level is an index, not a counter */ 174 /* max_level is an index, not a counter */
177 max_level--; 175 max_level--;
178 176
179 /* get max level */
180 if (property == GET_MAXL) {
181 *output = (unsigned int)max_level;
182 return 0;
183 }
184
185 if (property == GET_FREQ) 177 if (property == GET_FREQ)
186 level = descend ? input : (max_level - input); 178 level = descend ? input : (max_level - input);
187 179