generic/4.4: remove ISSI SI25CD512 SPI flash support patch
[openwrt.git] / target / linux / mediatek / patches / 0014-thermal-Add-comment-explaining-test-for-critical-tem.patch
1 From 18f50eae474edc716b01959fad6898c8553b131c Mon Sep 17 00:00:00 2001
2 From: Sascha Hauer <s.hauer@pengutronix.de>
3 Date: Wed, 13 May 2015 10:52:33 +0200
4 Subject: [PATCH 14/76] thermal: Add comment explaining test for critical
5  temperature
6
7 The code testing if a temperature should be emulated or not is
8 not obvious. Add a comment explaining why this test is done.
9
10 Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
11 Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
12 ---
13  drivers/thermal/thermal_core.c |    5 +++++
14  1 file changed, 5 insertions(+)
15
16 --- a/drivers/thermal/thermal_core.c
17 +++ b/drivers/thermal/thermal_core.c
18 @@ -438,6 +438,11 @@ int thermal_zone_get_temp(struct thermal
19                         }
20                 }
21  
22 +               /*
23 +                * Only allow emulating a temperature when the real temperature
24 +                * is below the critical temperature so that the emulation code
25 +                * cannot hide critical conditions.
26 +                */
27                 if (!ret && *temp < crit_temp)
28                         *temp = tz->emul_temperature;
29         }