Commit 903882c7 authored by Eliav Farber's avatar Eliav Farber Committed by Guenter Roeck

hwmon: (mr75203) fix undefined reference to `__divdi3'

Fix build error on 32-bit machines.

Fixes: 94c025b6 ("hwmon: (mr75203) modify the temperature equation according to series 5 datasheet")
Signed-off-by: default avatarEliav Farber <farbere@amazon.com>
Reported-by: default avatarkernel test robot <lkp@intel.com>
Tested-by: default avatarSudip Mukherjee <sudipm.mukherjee@gmail.com>
Link: https://lore.kernel.org/r/20220921121723.6726-1-farbere@amazon.comSigned-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
parent ac387b0c
...@@ -266,9 +266,9 @@ static long pvt_calc_temp(struct pvt_device *pvt, u32 nbs) ...@@ -266,9 +266,9 @@ static long pvt_calc_temp(struct pvt_device *pvt, u32 nbs)
struct temp_coeff *ts_coeff = &pvt->ts_coeff; struct temp_coeff *ts_coeff = &pvt->ts_coeff;
s64 tmp = ts_coeff->g + s64 tmp = ts_coeff->g +
ts_coeff->h * (s64)nbs / ts_coeff->cal5 - div_s64(ts_coeff->h * (s64)nbs, ts_coeff->cal5) -
ts_coeff->h / 2 + ts_coeff->h / 2 +
ts_coeff->j * (s64)pvt->ip_freq / HZ_PER_MHZ; div_s64(ts_coeff->j * (s64)pvt->ip_freq, HZ_PER_MHZ);
return clamp_val(tmp, PVT_TEMP_MIN_mC, PVT_TEMP_MAX_mC); return clamp_val(tmp, PVT_TEMP_MIN_mC, PVT_TEMP_MAX_mC);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment