]> git.ipfire.org Git - people/ms/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)
committerStefano Babic <sbabic@denx.de>
Fri, 10 Jul 2015 08:15:19 +0000 (10:15 +0200)
commit425640256a7c5e9259f7583ee4eca1f3b70f8032
treefcc36bcffc86bf641e9adc2c700eecbec42e2c4b
parent699279cac0ed0816433e0922aba26fe6dd0a8066
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