From 5d2f529c9b83d5f769258928b5ddd82f4dc9979e Mon Sep 17 00:00:00 2001 From: John Crispin Date: Mon, 21 Mar 2016 20:42:51 +0000 Subject: mediatek: bump to v4.4 Signed-off-by: John Crispin SVN-Revision: 49064 --- ...16-thermal-streamline-get_trend-callbacks.patch | 114 --------------------- 1 file changed, 114 deletions(-) delete mode 100644 target/linux/mediatek/patches/0016-thermal-streamline-get_trend-callbacks.patch (limited to 'target/linux/mediatek/patches/0016-thermal-streamline-get_trend-callbacks.patch') diff --git a/target/linux/mediatek/patches/0016-thermal-streamline-get_trend-callbacks.patch b/target/linux/mediatek/patches/0016-thermal-streamline-get_trend-callbacks.patch deleted file mode 100644 index 37c580ac82..0000000000 --- a/target/linux/mediatek/patches/0016-thermal-streamline-get_trend-callbacks.patch +++ /dev/null @@ -1,114 +0,0 @@ -From 5da86f6a2b4c2c318e153649dc8fd34fe73f8292 Mon Sep 17 00:00:00 2001 -From: Sascha Hauer -Date: Wed, 13 May 2015 10:52:35 +0200 -Subject: [PATCH 16/76] thermal: streamline get_trend callbacks - -The .get_trend callback in struct thermal_zone_device_ops has the prototype: - - int (*get_trend) (struct thermal_zone_device *, int, - enum thermal_trend *); - -whereas the .get_trend callback in struct thermal_zone_of_device_ops has: - - int (*get_trend)(void *, long *); - -Streamline both prototypes and add the trip argument to the OF callback -aswell and use enum thermal_trend * instead of an integer pointer. - -While the OF prototype may be the better one, this should be decided at -framework level and not on OF level. - -Signed-off-by: Sascha Hauer ---- - drivers/thermal/of-thermal.c | 11 +-------- - drivers/thermal/ti-soc-thermal/ti-thermal-common.c | 25 +++++++------------- - include/linux/thermal.h | 2 +- - 3 files changed, 10 insertions(+), 28 deletions(-) - ---- a/drivers/thermal/of-thermal.c -+++ b/drivers/thermal/of-thermal.c -@@ -187,24 +187,15 @@ static int of_thermal_get_trend(struct t - enum thermal_trend *trend) - { - struct __thermal_zone *data = tz->devdata; -- long dev_trend; - int r; - - if (!data->ops->get_trend) - return -EINVAL; - -- r = data->ops->get_trend(data->sensor_data, &dev_trend); -+ r = data->ops->get_trend(data->sensor_data, trip, trend); - if (r) - return r; - -- /* TODO: These intervals might have some thresholds, but in core code */ -- if (dev_trend > 0) -- *trend = THERMAL_TREND_RAISING; -- else if (dev_trend < 0) -- *trend = THERMAL_TREND_DROPPING; -- else -- *trend = THERMAL_TREND_STABLE; -- - return 0; - } - ---- a/drivers/thermal/ti-soc-thermal/ti-thermal-common.c -+++ b/drivers/thermal/ti-soc-thermal/ti-thermal-common.c -@@ -238,7 +238,7 @@ static int ti_thermal_get_trip_temp(stru - 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; -@@ -251,22 +251,6 @@ static int __ti_thermal_get_trend(void * - 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) -@@ -277,6 +261,13 @@ static int ti_thermal_get_trend(struct t - 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) ---- a/include/linux/thermal.h -+++ b/include/linux/thermal.h -@@ -274,7 +274,7 @@ struct thermal_genl_event { - */ - struct thermal_zone_of_device_ops { - int (*get_temp)(void *, int *); -- int (*get_trend)(void *, long *); -+ int (*get_trend)(void *, int, enum thermal_trend *); - int (*set_emul_temp)(void *, int); - }; - -- cgit v1.2.3