mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
cpu_cooling: Make of_cpufreq_power_cooling_register() parse DT
All the callers of of_cpufreq_power_cooling_register() have almost identical code and it makes more sense to move that code into the helper as its all about reading DT properties. This got rid of lot of redundant code. Acked-by: Eduardo Valentin <edubezval@gmail.com> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This commit is contained in:
parent
ae64f9bd1d
commit
f5f263fed6
7 changed files with 41 additions and 116 deletions
|
@ -56,10 +56,7 @@ of_cpufreq_cooling_register(struct device_node *np,
|
|||
struct cpufreq_policy *policy);
|
||||
|
||||
struct thermal_cooling_device *
|
||||
of_cpufreq_power_cooling_register(struct device_node *np,
|
||||
struct cpufreq_policy *policy,
|
||||
u32 capacitance,
|
||||
get_static_t plat_static_func);
|
||||
of_cpufreq_power_cooling_register(struct cpufreq_policy *policy);
|
||||
#else
|
||||
static inline struct thermal_cooling_device *
|
||||
of_cpufreq_cooling_register(struct device_node *np,
|
||||
|
@ -69,10 +66,7 @@ of_cpufreq_cooling_register(struct device_node *np,
|
|||
}
|
||||
|
||||
static inline struct thermal_cooling_device *
|
||||
of_cpufreq_power_cooling_register(struct device_node *np,
|
||||
struct cpufreq_policy *policy,
|
||||
u32 capacitance,
|
||||
get_static_t plat_static_func)
|
||||
of_cpufreq_power_cooling_register(struct cpufreq_policy *policy)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
@ -105,10 +99,7 @@ of_cpufreq_cooling_register(struct device_node *np,
|
|||
}
|
||||
|
||||
static inline struct thermal_cooling_device *
|
||||
of_cpufreq_power_cooling_register(struct device_node *np,
|
||||
struct cpufreq_policy *policy,
|
||||
u32 capacitance,
|
||||
get_static_t plat_static_func)
|
||||
of_cpufreq_power_cooling_register(struct cpufreq_policy *policy)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue