From cf935f3dd426d63ae39756c4eb24041c5f8b0e9f Mon Sep 17 00:00:00 2001 From: Ye Li Date: Mon, 25 Jun 2018 19:43:14 -0700 Subject: [PATCH] MLK-18686-2 sc_thermal: Fix interpreting tenths as millicelsius When calculate the temperature in millicelsius, the tenths are handled incorrectly. Signed-off-by: Ye Li Acked-by: Peng Fan (cherry picked from commit 72796a2e138bb7b5b4db9f771a3f9b823b66ade5) (cherry picked from commit 1288dc25fb849c98b01dce0b130d83cf33939c6b) --- drivers/thermal/imx_sc_thermal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/thermal/imx_sc_thermal.c b/drivers/thermal/imx_sc_thermal.c index b6f0d9c1fe..0c23f08d3f 100644 --- a/drivers/thermal/imx_sc_thermal.c +++ b/drivers/thermal/imx_sc_thermal.c @@ -48,7 +48,7 @@ static int read_temperature(struct udevice *dev, int *temp) return -EIO; } - *temp = celsius * 1000 + tenths; + *temp = celsius * 1000 + tenths * 100; return 0; } -- 2.17.1