]> rtime.felk.cvut.cz Git - hercules2020/nv-tegra/linux-4.4.git/commitdiff
driver: therm_fan_est: port to k4.4
authorSrikar Srimath Tirumala <srikars@nvidia.com>
Tue, 3 May 2016 01:15:26 +0000 (18:15 -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: I6aa12871fb69e4cfc92aff306cd8db657d91fc6f
Signed-off-by: Srikar Srimath Tirumala <srikars@nvidia.com>
drivers/misc/therm_fan_est.c

index f6cadd443823bc14e27a2c87f69b00ec3f5bd826..a41d03638cb60a01bbe5443126d91b5055aad8ef 100644 (file)
@@ -126,7 +126,8 @@ static int therm_fan_est_bind(struct thermal_zone_device *thz,
        struct therm_fan_estimator *est = thz->devdata;
        if (!strcmp(cdev->type, est->cdev_type)) {
                for (i = 0; i < MAX_ACTIVE_STATES; i++)
-                       thermal_zone_bind_cooling_device(thz, i, cdev, i, i);
+                       thermal_zone_bind_cooling_device(thz, i, cdev, i, i,
+                                       THERMAL_WEIGHT_DEFAULT);
        }
 
        return 0;
@@ -154,7 +155,7 @@ static int therm_fan_est_get_trip_type(struct thermal_zone_device *thz,
 }
 
 static int therm_fan_est_get_trip_temp(struct thermal_zone_device *thz,
-                                       int trip, long *temp)
+                                       int trip, int *temp)
 {
        struct therm_fan_estimator *est = thz->devdata;
 
@@ -170,7 +171,7 @@ static int therm_fan_est_get_trip_temp(struct thermal_zone_device *thz,
 }
 
 static int therm_fan_est_set_trip_temp(struct thermal_zone_device *thz,
-                                       int trip, long temp)
+                                       int trip, int temp)
 {
        struct therm_fan_estimator *est = thz->devdata;
 
@@ -182,7 +183,7 @@ static int therm_fan_est_set_trip_temp(struct thermal_zone_device *thz,
        return 0;
 }
 
-static int therm_fan_est_get_temp(struct thermal_zone_device *thz, long *temp)
+static int therm_fan_est_get_temp(struct thermal_zone_device *thz, int *temp)
 {
        struct therm_fan_estimator *est = thz->devdata;
 
@@ -191,7 +192,7 @@ static int therm_fan_est_get_temp(struct thermal_zone_device *thz, long *temp)
 }
 
 static int therm_fan_est_set_trip_hyst(struct thermal_zone_device *thz,
-                               int trip, long hyst_temp)
+                               int trip, int hyst_temp)
 {
        struct therm_fan_estimator *est = thz->devdata;
 
@@ -205,7 +206,7 @@ static int therm_fan_est_set_trip_hyst(struct thermal_zone_device *thz,
 }
 
 static int therm_fan_est_get_trip_hyst(struct thermal_zone_device *thz,
-                               int trip, long *temp)
+                               int trip, int *temp)
 {
        struct therm_fan_estimator *est = thz->devdata;