Skip to content

Commit

Permalink
thermal: imx_sc_thermal: Fix incorrect data type
Browse files Browse the repository at this point in the history
The temperature value passed from SCU could be negative value,
the data type should be signed instead of unsigned.

Fixes: e20db70 ("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
  • Loading branch information
Anson Huang authored and Daniel Lezcano committed Mar 23, 2020
1 parent f21431f commit 968ea0d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/thermal/imx_sc_thermal.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 968ea0d

Please sign in to comment.