diff options
author | Ingo Molnar <mingo@kernel.org> | 2016-05-07 07:00:07 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2016-05-07 07:00:07 +0200 |
commit | 35dc9ec1076b79c31bf7ed538af008b7f23bb14d (patch) | |
tree | f90affdd5dc45f47f8d5d84ea34c71e5e521e7a1 /drivers/thermal/hisi_thermal.c | |
parent | 0ec7ae928a9c19c2b7b8054507d5694a2597065e (diff) | |
parent | 07837831047fb72856d1f61a726a4094397facd8 (diff) |
Merge branch 'linus' into efi/core, to pick up fixes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'drivers/thermal/hisi_thermal.c')
-rw-r--r-- | drivers/thermal/hisi_thermal.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/thermal/hisi_thermal.c b/drivers/thermal/hisi_thermal.c index 36d07295f8e3..5e820b541506 100644 --- a/drivers/thermal/hisi_thermal.c +++ b/drivers/thermal/hisi_thermal.c @@ -68,12 +68,12 @@ static inline int _step_to_temp(int step) * Every step equals (1 * 200) / 255 celsius, and finally * need convert to millicelsius. */ - return (HISI_TEMP_BASE + (step * 200 / 255)) * 1000; + return (HISI_TEMP_BASE * 1000 + (step * 200000 / 255)); } static inline long _temp_to_step(long temp) { - return ((temp / 1000 - HISI_TEMP_BASE) * 255 / 200); + return ((temp - HISI_TEMP_BASE * 1000) * 255) / 200000; } static long hisi_thermal_get_sensor_temp(struct hisi_thermal_data *data, |