Skip to content

Commit

Permalink
thermal: cpu_cooling: get_property() doesn't need to support GET_MAXL…
Browse files Browse the repository at this point in the history
… 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>
  • Loading branch information
Viresh Kumar authored and Eduardo Valentin committed Dec 8, 2014
1 parent dcc6c7f commit 97afa4a
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions drivers/thermal/cpu_cooling.c
Original file line number Diff line number Diff line change
Expand Up @@ -116,20 +116,18 @@ static void release_idr(struct idr *idr, int id)
enum cpufreq_cooling_property {
GET_LEVEL,
GET_FREQ,
GET_MAXL,
};

/**
* get_property - fetch a property of interest for a given cpu.
* @cpu: cpu for which the property is required
* @input: query parameter
* @output: query return
* @property: type of query (frequency, level, max level)
* @property: type of query (frequency, level)
*
* This is the common function to
* 1. get maximum cpu cooling states
* 2. translate frequency to cooling state
* 3. translate cooling state to frequency
* 1. translate frequency to cooling state
* 2. translate cooling state to frequency
*
* Note that the code may be not in good shape
* but it is written in this way in order to:
Expand Down Expand Up @@ -176,12 +174,6 @@ static int get_property(unsigned int cpu, unsigned long input,
/* max_level is an index, not a counter */
max_level--;

/* get max level */
if (property == GET_MAXL) {
*output = (unsigned int)max_level;
return 0;
}

if (property == GET_FREQ)
level = descend ? input : (max_level - input);

Expand Down

0 comments on commit 97afa4a

Please sign in to comment.