summaryrefslogtreecommitdiffstats
path: root/target/linux/mediatek/patches/0015-thermal-inline-only-once-used-function.patch
diff options
context:
space:
mode:
authorJohn Crispin <john@openwrt.org>2015-11-02 10:18:50 +0000
committerJohn Crispin <john@openwrt.org>2015-11-02 10:18:50 +0000
commit25afe99b31f4ef3d835f96545e370770c230ac44 (patch)
tree5dbe83834a0a67121c557b7549a13221317f07eb /target/linux/mediatek/patches/0015-thermal-inline-only-once-used-function.patch
parent12e0d2737f558e886cf698e939f1758ab6a64947 (diff)
downloadmaster-31e0f0ae-25afe99b31f4ef3d835f96545e370770c230ac44.tar.gz
master-31e0f0ae-25afe99b31f4ef3d835f96545e370770c230ac44.tar.bz2
master-31e0f0ae-25afe99b31f4ef3d835f96545e370770c230ac44.zip
mediatek: add support for the new MT7623 Arm SoC
the support is still WIP. next steps are to make the pmic and ethernet work. this is the first commit to make sure nothing gets lost. Signed-off-by: John Crispin <blogic@openwrt.org> SVN-Revision: 47354
Diffstat (limited to 'target/linux/mediatek/patches/0015-thermal-inline-only-once-used-function.patch')
-rw-r--r--target/linux/mediatek/patches/0015-thermal-inline-only-once-used-function.patch53
1 files changed, 53 insertions, 0 deletions
diff --git a/target/linux/mediatek/patches/0015-thermal-inline-only-once-used-function.patch b/target/linux/mediatek/patches/0015-thermal-inline-only-once-used-function.patch
new file mode 100644
index 0000000000..e050ae763a
--- /dev/null
+++ b/target/linux/mediatek/patches/0015-thermal-inline-only-once-used-function.patch
@@ -0,0 +1,53 @@
+From 0b729a98127ef045096edf20dfe5c4eadac21d44 Mon Sep 17 00:00:00 2001
+From: Sascha Hauer <s.hauer@pengutronix.de>
+Date: Wed, 13 May 2015 10:52:34 +0200
+Subject: [PATCH 15/76] thermal: inline only once used function
+
+Inline update_temperature into its only caller to make the code
+more readable.
+
+Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
+Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
+---
+ drivers/thermal/thermal_core.c | 17 +++++------------
+ 1 file changed, 5 insertions(+), 12 deletions(-)
+
+diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c
+index e204deb..19da022 100644
+--- a/drivers/thermal/thermal_core.c
++++ b/drivers/thermal/thermal_core.c
+@@ -450,9 +450,12 @@ exit:
+ }
+ EXPORT_SYMBOL_GPL(thermal_zone_get_temp);
+
+-static void update_temperature(struct thermal_zone_device *tz)
++void thermal_zone_device_update(struct thermal_zone_device *tz)
+ {
+- int temp, ret;
++ int temp, ret, count;
++
++ if (!tz->ops->get_temp)
++ return;
+
+ ret = thermal_zone_get_temp(tz, &temp);
+ if (ret) {
+@@ -471,16 +474,6 @@ static void update_temperature(struct thermal_zone_device *tz)
+ trace_thermal_temperature(tz);
+ dev_dbg(&tz->device, "last_temperature=%d, current_temperature=%d\n",
+ tz->last_temperature, tz->temperature);
+-}
+-
+-void thermal_zone_device_update(struct thermal_zone_device *tz)
+-{
+- int count;
+-
+- if (!tz->ops->get_temp)
+- return;
+-
+- update_temperature(tz);
+
+ for (count = 0; count < tz->trips; count++)
+ handle_thermal_trip(tz, count);
+--
+1.7.10.4
+