[COMMON] thermal: cpu_cooling: Fix set_cur_temp API
authorHyeonseong Gil <hs.gil@samsung.com>
Thu, 13 Apr 2017 06:31:23 +0000 (15:31 +0900)
committerChungwoo Park <cww.park@samsung.com>
Mon, 21 May 2018 08:18:42 +0000 (17:18 +0900)
Resolved migration conflicts from kernel 4.9 to 4.14.

Change-Id: Id1c3cf9b8496a9479cf63eb1599988a589afcf7b
Signed-off-by: Hyeonseong Gil <hs.gil@samsung.com>
drivers/thermal/cpu_cooling.c

index 12b4be2c10be1333a5583f29cdf9e7f7554769ab..5b780579acdbc0c01690c4d7f0556d86890dd7fb 100644 (file)
@@ -799,6 +799,7 @@ static struct thermal_cooling_device_ops cpufreq_cooling_ops = {
        .get_cur_state = cpufreq_get_cur_state,
        .set_cur_state = cpufreq_set_cur_state,
        .get_cooling_level = exynos_cpufreq_cooling_get_level,
+       .set_cur_temp = cpufreq_set_cur_temp,
 };
 
 static struct thermal_cooling_device_ops cpufreq_power_cooling_ops = {
@@ -808,6 +809,7 @@ static struct thermal_cooling_device_ops cpufreq_power_cooling_ops = {
        .get_requested_power    = cpufreq_get_requested_power,
        .state2power            = cpufreq_state2power,
        .power2state            = cpufreq_power2state,
+       .set_cur_temp = cpufreq_set_cur_temp,
 };
 
 /* Notifier for cpufreq policy change */
@@ -908,9 +910,6 @@ __cpufreq_cooling_register(struct device_node *np,
        }
        cpufreq_cdev->id = ret;
 
-       if (cpufreq_cdev->id == 0)
-               cpufreq_cooling_ops.set_cur_temp = cpufreq_set_cur_temp;
-
        snprintf(dev_name, sizeof(dev_name), "thermal-cpufreq-%d",
                 cpufreq_cdev->id);