提交 934c93b8 编写于 作者: S Sascha Hauer 提交者: Zhang Rui

thermal: Add comment explaining test for critical temperature

The code testing if a temperature should be emulated or not is
not obvious. Add a comment explaining why this test is done.
Signed-off-by: NSascha Hauer <s.hauer@pengutronix.de>
Reviewed-by: NMikko Perttunen <mperttunen@nvidia.com>
Signed-off-by: NZhang Rui <rui.zhang@intel.com>
上级 79e5421c
......@@ -498,6 +498,11 @@ int thermal_zone_get_temp(struct thermal_zone_device *tz, int *temp)
}
}
/*
* Only allow emulating a temperature when the real temperature
* is below the critical temperature so that the emulation code
* cannot hide critical conditions.
*/
if (!ret && *temp < crit_temp)
*temp = tz->emul_temperature;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册