]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit - drivers/thermal/hisi_thermal.c
thermal/drivers/hisi: Simplify the temperature/step computation
authorDaniel Lezcano <daniel.lezcano@linaro.org>
Thu, 19 Oct 2017 17:05:46 +0000 (19:05 +0200)
committerEduardo Valentin <edubezval@gmail.com>
Wed, 1 Nov 2017 02:32:15 +0000 (19:32 -0700)
commit48880b979cdc9ef5a70af020f42b8ba1e51dbd34
treee1318ec32d7d49f47db5b8612ff088e35c509e13
parent2cb4de785c40d4a2132cfc13e63828f5a28c3351
thermal/drivers/hisi: Simplify the temperature/step computation

The step and the base temperature are fixed values, we can simplify the
computation by converting the base temperature to milli celsius and use a
pre-computed step value. That saves us a lot of mult + div for nothing at
runtime.

Take also the opportunity to change the function names to be consistent with
the rest of the code.

Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Reviewed-by: Leo Yan <leo.yan@linaro.org>
Tested-by: Leo Yan <leo.yan@linaro.org>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
drivers/thermal/hisi_thermal.c