|
@@ -239,7 +239,7 @@ static int ti_thermal_get_trip_temp(struct thermal_zone_device *thermal,
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
-static int __ti_thermal_get_trend(void *p, long *trend)
|
|
|
+static int __ti_thermal_get_trend(void *p, int trip, enum thermal_trend *trend)
|
|
|
{
|
|
|
struct ti_thermal_data *data = p;
|
|
|
struct ti_bandgap *bgp;
|
|
@@ -252,22 +252,6 @@ static int __ti_thermal_get_trend(void *p, long *trend)
|
|
|
if (ret)
|
|
|
return ret;
|
|
|
|
|
|
- *trend = tr;
|
|
|
-
|
|
|
- return 0;
|
|
|
-}
|
|
|
-
|
|
|
-/* Get the temperature trend callback functions for thermal zone */
|
|
|
-static int ti_thermal_get_trend(struct thermal_zone_device *thermal,
|
|
|
- int trip, enum thermal_trend *trend)
|
|
|
-{
|
|
|
- int ret;
|
|
|
- long tr;
|
|
|
-
|
|
|
- ret = __ti_thermal_get_trend(thermal->devdata, &tr);
|
|
|
- if (ret)
|
|
|
- return ret;
|
|
|
-
|
|
|
if (tr > 0)
|
|
|
*trend = THERMAL_TREND_RAISING;
|
|
|
else if (tr < 0)
|
|
@@ -278,6 +262,13 @@ static int ti_thermal_get_trend(struct thermal_zone_device *thermal,
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
+/* Get the temperature trend callback functions for thermal zone */
|
|
|
+static int ti_thermal_get_trend(struct thermal_zone_device *thermal,
|
|
|
+ int trip, enum thermal_trend *trend)
|
|
|
+{
|
|
|
+ return __ti_thermal_get_trend(thermal->devdata, trip, trend);
|
|
|
+}
|
|
|
+
|
|
|
/* Get critical temperature callback functions for thermal zone */
|
|
|
static int ti_thermal_get_crit_temp(struct thermal_zone_device *thermal,
|
|
|
int *temp)
|