diff options
author | Viresh Kumar <viresh.kumar@linaro.org> | 2017-04-25 12:27:16 +0200 |
---|---|---|
committer | Eduardo Valentin <edubezval@gmail.com> | 2017-05-28 02:32:33 +0200 |
commit | b12b6519496bb07b0845ed50eee1ca75c3b7fa81 (patch) | |
tree | 1af8469958f43f66b2f62e0fd4cd81c36a84c993 /drivers/thermal/cpu_cooling.c | |
parent | cpufreq: create cpufreq_table_count_valid_entries() (diff) | |
download | linux-b12b6519496bb07b0845ed50eee1ca75c3b7fa81.tar.xz linux-b12b6519496bb07b0845ed50eee1ca75c3b7fa81.zip |
thermal: cpu_cooling: store cpufreq policy
The cpufreq policy can be used by the cpu_cooling driver, lets store it
in the cpufreq_cooling_device structure.
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Lukasz Luba <lukasz.luba@arm.com>
Tested-by: Lukasz Luba <lukasz.luba@arm.com>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
Diffstat (limited to 'drivers/thermal/cpu_cooling.c')
-rw-r--r-- | drivers/thermal/cpu_cooling.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/thermal/cpu_cooling.c b/drivers/thermal/cpu_cooling.c index 55ff45c1e917..7dddc7443f5d 100644 --- a/drivers/thermal/cpu_cooling.c +++ b/drivers/thermal/cpu_cooling.c @@ -67,6 +67,7 @@ struct power_table { * registered. * @cdev: thermal_cooling_device pointer to keep track of the * registered cooling device. + * @policy: cpufreq policy. * @cpufreq_state: integer value representing the current state of cpufreq * cooling devices. * @clipped_freq: integer value representing the absolute value of the clipped @@ -91,6 +92,7 @@ struct power_table { struct cpufreq_cooling_device { int id; struct thermal_cooling_device *cdev; + struct cpufreq_policy *policy; unsigned int cpufreq_state; unsigned int clipped_freq; unsigned int max_level; @@ -760,6 +762,7 @@ __cpufreq_cooling_register(struct device_node *np, if (!cpufreq_cdev) return ERR_PTR(-ENOMEM); + cpufreq_cdev->policy = policy; num_cpus = cpumask_weight(policy->related_cpus); cpufreq_cdev->time_in_idle = kcalloc(num_cpus, sizeof(*cpufreq_cdev->time_in_idle), |