]> rtime.felk.cvut.cz Git - hercules2020/nv-tegra/linux-4.4.git/commitdiff
tegra: therm_est: port to k4.4
authorSrikar Srimath Tirumala <srikars@nvidia.com>
Tue, 3 May 2016 01:07:29 +0000 (18:07 -0700)
committerSrikar Srimath Tirumala <srikars@nvidia.com>
Fri, 6 May 2016 22:04:31 +0000 (15:04 -0700)
* change temperature from long to int
* switch to k4.4 apis for cooling device

Change-Id: I354677567eb18d8960578531e26e5471ae10e65c

drivers/misc/therm_est.c

index 89e42f39fc3aeed125cb94ca18ae510196926388..c192297d66235652287148169cb33986b49f46df 100644 (file)
@@ -63,7 +63,7 @@ static int therm_est_subdev_match(struct thermal_zone_device *thz, void *data)
 }
 
 static int therm_est_subdev_get_temp(struct thermal_zone_device *thz,
-                                       long *temp)
+                                       int *temp)
 {
        if (!thz || !thz->ops->get_temp || thz->ops->get_temp(thz, temp))
                *temp = 25000;
@@ -75,9 +75,9 @@ static void therm_est_update_limits(struct therm_estimator *est)
 {
        const int MAX_HIGH_TEMP = 128000;
        long low_temp = 0, high_temp = MAX_HIGH_TEMP;
-       long trip_temp, passive_low_temp = MAX_HIGH_TEMP;
+       int trip_temp, passive_low_temp = MAX_HIGH_TEMP;
        enum thermal_trip_type trip_type;
-       long hysteresis, zone_temp;
+       int hysteresis, zone_temp;
        int i;
 
        zone_temp = est->thz->temperature;