thermal/drivers/mtk: Use function pointer for raw_to_mcelsius
authorDaniel Golle <daniel@makrotopia.org>
Wed, 18 Jan 2023 15:40:39 +0000 (15:40 +0000)
committerDaniel Lezcano <daniel.lezcano@linaro.org>
Tue, 24 Jan 2023 10:43:22 +0000 (11:43 +0100)
commit4f2ee0aa2e70622e01c06686a967a4dab6fb7f05
treed2f2a4d90cfea2c2cc8bdb854c9df61841149f45
parentd69e7041a39c24de8c935b82c1edae6490be5b4d
thermal/drivers/mtk: Use function pointer for raw_to_mcelsius

Instead of having if-else logic selecting either raw_to_mcelsius_v1 or
raw_to_mcelsius_v2 in mtk_thermal_bank_temperature introduce a function
pointer raw_to_mcelsius to struct mtk_thermal which is initialized in the
probe function.

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com>
Link: https://lore.kernel.org/r/69c17529e8418da3eec703dde31e1b01e5b0f7e8.1674055882.git.daniel@makrotopia.org
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
drivers/thermal/mtk_thermal.c