aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@linaro.org>2017-12-05 00:32:45 -0500
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2017-12-07 16:52:01 -0500
commit3ebb62ffc4e4817c3288cdf7ed67ccaf453385e3 (patch)
treeda03e6ce681e3777478267971555d7e6646e6cf3 /include/linux
parentba0966da208ef0793486502a0e6b929fbd6d4223 (diff)
cpu_cooling: Keep only one of_cpufreq*cooling_register() helper
of_cpufreq_cooling_register() isn't used by anyone and so can be removed, but then we would be left with two routines: cpufreq_cooling_register() and of_cpufreq_power_cooling_register() that would look odd. Remove current implementation of of_cpufreq_cooling_register() and rename of_cpufreq_power_cooling_register() as of_cpufreq_cooling_register(). This simplifies lots of stuff. 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>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/cpu_cooling.h53
1 files changed, 14 insertions, 39 deletions
diff --git a/include/linux/cpu_cooling.h b/include/linux/cpu_cooling.h
index c35778960a9c..fd0ea8ddca93 100644
--- a/include/linux/cpu_cooling.h
+++ b/include/linux/cpu_cooling.h
@@ -42,33 +42,6 @@ struct thermal_cooling_device *
42cpufreq_cooling_register(struct cpufreq_policy *policy); 42cpufreq_cooling_register(struct cpufreq_policy *policy);
43 43
44/** 44/**
45 * of_cpufreq_cooling_register - create cpufreq cooling device based on DT.
46 * @np: a valid struct device_node to the cooling device device tree node.
47 * @policy: cpufreq policy.
48 */
49#ifdef CONFIG_THERMAL_OF
50struct thermal_cooling_device *
51of_cpufreq_cooling_register(struct device_node *np,
52 struct cpufreq_policy *policy);
53
54struct thermal_cooling_device *
55of_cpufreq_power_cooling_register(struct cpufreq_policy *policy);
56#else
57static inline struct thermal_cooling_device *
58of_cpufreq_cooling_register(struct device_node *np,
59 struct cpufreq_policy *policy)
60{
61 return ERR_PTR(-ENOSYS);
62}
63
64static inline struct thermal_cooling_device *
65of_cpufreq_power_cooling_register(struct cpufreq_policy *policy)
66{
67 return NULL;
68}
69#endif
70
71/**
72 * cpufreq_cooling_unregister - function to remove cpufreq cooling device. 45 * cpufreq_cooling_unregister - function to remove cpufreq cooling device.
73 * @cdev: thermal cooling device pointer. 46 * @cdev: thermal cooling device pointer.
74 */ 47 */
@@ -81,24 +54,26 @@ cpufreq_cooling_register(struct cpufreq_policy *policy)
81 return ERR_PTR(-ENOSYS); 54 return ERR_PTR(-ENOSYS);
82} 55}
83 56
84static inline struct thermal_cooling_device * 57static inline
85of_cpufreq_cooling_register(struct device_node *np, 58void cpufreq_cooling_unregister(struct thermal_cooling_device *cdev)
86 struct cpufreq_policy *policy)
87{ 59{
88 return ERR_PTR(-ENOSYS); 60 return;
89} 61}
62#endif /* CONFIG_CPU_THERMAL */
90 63
64#if defined(CONFIG_THERMAL_OF) && defined(CONFIG_CPU_THERMAL)
65/**
66 * of_cpufreq_cooling_register - create cpufreq cooling device based on DT.
67 * @policy: cpufreq policy.
68 */
69struct thermal_cooling_device *
70of_cpufreq_cooling_register(struct cpufreq_policy *policy);
71#else
91static inline struct thermal_cooling_device * 72static inline struct thermal_cooling_device *
92of_cpufreq_power_cooling_register(struct cpufreq_policy *policy) 73of_cpufreq_cooling_register(struct cpufreq_policy *policy)
93{ 74{
94 return NULL; 75 return NULL;
95} 76}
96 77#endif /* defined(CONFIG_THERMAL_OF) && defined(CONFIG_CPU_THERMAL) */
97static inline
98void cpufreq_cooling_unregister(struct thermal_cooling_device *cdev)
99{
100 return;
101}
102#endif /* CONFIG_CPU_THERMAL */
103 78
104#endif /* __CPU_COOLING_H__ */ 79#endif /* __CPU_COOLING_H__ */