diff options
author | Anson Huang <Anson.Huang@nxp.com> | 2020-03-19 09:26:20 +0100 |
---|---|---|
committer | Daniel Lezcano <daniel.lezcano@linaro.org> | 2020-03-23 15:20:47 +0100 |
commit | 968ea0dffa9396e9f8e00f12fd69be95f5a09191 (patch) | |
tree | 742228d1291dfa8dd2e7225601a8f352da1f92f8 /drivers/thermal/imx_sc_thermal.c | |
parent | thermal: int340x_thermal: Use scnprintf() for avoiding potential buffer overflow (diff) | |
download | linux-968ea0dffa9396e9f8e00f12fd69be95f5a09191.tar.xz linux-968ea0dffa9396e9f8e00f12fd69be95f5a09191.zip |
thermal: imx_sc_thermal: Fix incorrect data type
The temperature value passed from SCU could be negative value,
the data type should be signed instead of unsigned.
Fixes: e20db70dba1c ("thermal: imx_sc: add i.MX system controller thermal support")
Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Reviewed-by: Amit Kucheria <amit.kucheria@linaro.org>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/1584606380-9972-1-git-send-email-Anson.Huang@nxp.com
Diffstat (limited to 'drivers/thermal/imx_sc_thermal.c')
-rw-r--r-- | drivers/thermal/imx_sc_thermal.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/thermal/imx_sc_thermal.c b/drivers/thermal/imx_sc_thermal.c index dbb277af232d..a8723b1eb8b0 100644 --- a/drivers/thermal/imx_sc_thermal.c +++ b/drivers/thermal/imx_sc_thermal.c @@ -30,8 +30,8 @@ struct req_get_temp { } __packed __aligned(4); struct resp_get_temp { - u16 celsius; - u8 tenths; + s16 celsius; + s8 tenths; } __packed __aligned(4); struct imx_sc_msg_misc_get_temp { |