thermal/core: Precompute the delays from msecs to jiffies
authorDaniel Lezcano <daniel.lezcano@linaro.org>
Wed, 16 Dec 2020 22:03:35 +0000 (23:03 +0100)
committerDaniel Lezcano <daniel.lezcano@linaro.org>
Tue, 19 Jan 2021 21:23:38 +0000 (22:23 +0100)
commit17d399cd9c8936909bc8936a5837b6da9af9c29e
tree6c7da345cc161493bc761054d62fca317a76050b
parent2121496fdc5f2d93eda9743c4b487469f0042e3c
thermal/core: Precompute the delays from msecs to jiffies

The delays are stored in ms units and when the polling function is
called this delay is converted into jiffies at each call.

Instead of doing the conversion again and again, compute the jiffies
at init time and use the value directly when setting the polling.

Cc: Thara Gopinath <thara.gopinath@linaro.org>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Reviewed-by: Lukasz Luba <lukasz.luba@arm.com>
Reviewed-by: Thara Gopinath <thara.gopinath@linaro.org>
Link: https://lore.kernel.org/r/20201216220337.839878-1-daniel.lezcano@linaro.org
drivers/thermal/thermal_core.c
drivers/thermal/thermal_core.h
drivers/thermal/thermal_helpers.c
include/linux/thermal.h