From: Hyeonseong Gil Date: Mon, 18 Sep 2017 02:15:54 +0000 (+0900) Subject: thermal: cpu_cooling: Change cooling device node X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=4a1872ef071c3dbc5bcff6b3750fc61130af0cd6;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git thermal: cpu_cooling: Change cooling device node Previously, CPU device node was used to register the cooling device. We chanaged to use the cpufreq device node for registration even if the specific CPU was turned off. Change-Id: I7e6e76fe38a2d05a9968290adb080d85712a5afd Signed-off-by: Hyeonseong Gil --- diff --git a/drivers/thermal/cpu_cooling.c b/drivers/thermal/cpu_cooling.c index d52e5612363f..dab2d9ac76c0 100644 --- a/drivers/thermal/cpu_cooling.c +++ b/drivers/thermal/cpu_cooling.c @@ -1169,22 +1169,13 @@ void cpufreq_cooling_unregister(struct thermal_cooling_device *cdev) EXPORT_SYMBOL_GPL(cpufreq_cooling_unregister); struct thermal_cooling_device * -exynos_cpufreq_cooling_register(const struct cpumask *clip_cpus) +exynos_cpufreq_cooling_register(struct device_node *np, const struct cpumask *clip_cpus) { - struct device *dev; - struct device_node *np; struct thermal_zone_device *tz; void *gen_block; struct ect_gen_param_table *pwr_coeff; u32 capacitance = 0; - dev = get_cpu_device(cpumask_first(clip_cpus)); - - if (!dev) - return ERR_PTR(-EINVAL); - - np = of_node_get(dev->of_node); - if (!np) return ERR_PTR(-EINVAL); diff --git a/include/linux/cpu_cooling.h b/include/linux/cpu_cooling.h index 23a94959c10d..14f8dfbf1c76 100644 --- a/include/linux/cpu_cooling.h +++ b/include/linux/cpu_cooling.h @@ -103,7 +103,7 @@ of_cpufreq_power_cooling_register(struct device_node *np, get_static_t plat_static_func); struct thermal_cooling_device * -exynos_cpufreq_cooling_register(const struct cpumask *clip_cpus); +exynos_cpufreq_cooling_register(struct device_node *np, const struct cpumask *clip_cpus); #else static inline struct thermal_cooling_device * @@ -123,7 +123,7 @@ of_cpufreq_power_cooling_register(struct device_node *np, } static inline struct thermal_cooling_device * -exynos_cpufreq_cooling_register(const struct cpumask *clip_cpus); +exynos_cpufreq_cooling_register(struct device_node *np, const struct cpumask *clip_cpus); { return NULL; } @@ -166,7 +166,7 @@ of_cpufreq_power_cooling_register(struct device_node *np, } static inline struct thermal_cooling_device * -exynos_cpufreq_cooling_register(const struct cpumask *clip_cpus) +exynos_cpufreq_cooling_register(struct device_node *np, const struct cpumask *clip_cpus) { return NULL; }