diff options
-rw-r--r-- | drivers/thermal/cpu_cooling.c | 14 |
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) | |||
116 | enum cpufreq_cooling_property { | 116 | enum 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 | ||