2
0

0014-thermal-Add-comment-explaining-test-for-critical-tem.patch 961 B

1234567891011121314151617181920212223242526272829
  1. From 18f50eae474edc716b01959fad6898c8553b131c Mon Sep 17 00:00:00 2001
  2. From: Sascha Hauer <[email protected]>
  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. The code testing if a temperature should be emulated or not is
  7. not obvious. Add a comment explaining why this test is done.
  8. Signed-off-by: Sascha Hauer <[email protected]>
  9. Reviewed-by: Mikko Perttunen <[email protected]>
  10. ---
  11. drivers/thermal/thermal_core.c | 5 +++++
  12. 1 file changed, 5 insertions(+)
  13. --- a/drivers/thermal/thermal_core.c
  14. +++ b/drivers/thermal/thermal_core.c
  15. @@ -438,6 +438,11 @@ int thermal_zone_get_temp(struct thermal
  16. }
  17. }
  18. + /*
  19. + * Only allow emulating a temperature when the real temperature
  20. + * is below the critical temperature so that the emulation code
  21. + * cannot hide critical conditions.
  22. + */
  23. if (!ret && *temp < crit_temp)
  24. *temp = tz->emul_temperature;
  25. }