]> code.ossystems Code Review - bsp/u-boot.git/commit
thermal: imx_thermal: fix busywait if IMX6 temp <0C
authorTim Harvey <tharvey@gateworks.com>
Wed, 8 Jul 2015 22:49:43 +0000 (15:49 -0700)
committerOtavio Salvador <otavio@ossystems.com.br>
Wed, 15 Jul 2015 00:42:58 +0000 (21:42 -0300)
commit6f3f04ece57d05a11ca41e848d08724727267583
tree0b9de5165fc53b80cd1205d18720c148d5055a8b
parenta9780504522be3e046eddfd458d7f90c178c1a54
thermal: imx_thermal: fix busywait if IMX6 temp <0C

The temperature calculation must be typecasted to keep the compiler
from sign extending a negative value prior to division.

This fixes an issue where if the CPU temperature is <0C it will get stuck
in the busywait loop until the CPU heats up to 0C.

Cc: Ye Li <b37916@freescale.com>
Cc: Jason Liu <r64343@freescale.com>
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
drivers/thermal/imx_thermal.c