Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit aa3276c9 authored by Daniel Lezcano's avatar Daniel Lezcano Committed by Kevin Wangtao
Browse files

BACKPORT: thermal/drivers/hisi: Convert long to int



There is no point to specify the temperature as long variable, the int is
enough.

Replace all long variables to int, so making the code consistent.

Change-Id: Iabed1d48fa61963bb2ef7ec13b018970fe96cff6
Signed-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
Reviewed-by: default avatarLeo Yan <leo.yan@linaro.org>
Signed-off-by: default avatarEduardo Valentin <edubezval@gmail.com>
(cherry picked from commit bc02ef6d98a601a39f735cbbb67807fb752b5138)
Signed-off-by: default avatarKevin Wangtao <kevin.wangtao@hisilicon.com>
parent 72050106
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -85,12 +85,12 @@ static inline int hisi_thermal_step_to_temp(int step)
	return HISI_TEMP_BASE + (step * HISI_TEMP_STEP);
}

static inline long hisi_thermal_temp_to_step(long temp)
static inline int hisi_thermal_temp_to_step(int temp)
{
	return (temp - HISI_TEMP_BASE) / HISI_TEMP_STEP;
}

static inline long hisi_thermal_round_temp(int temp)
static inline int hisi_thermal_round_temp(int temp)
{
	return hisi_thermal_step_to_temp(
		hisi_thermal_temp_to_step(temp));