thermal: imx: fix calculation
authorPeng Fan <peng.fan@nxp.com>
Tue, 18 Apr 2017 12:41:53 +0000 (20:41 +0800)
committerStefano Babic <sbabic@denx.de>
Thu, 11 May 2017 10:32:50 +0000 (12:32 +0200)
commita267d3accd98fe246df72d6f36922ba146b437d4
tree962c27acd5acb2a828cdacc50a79354083863212
parent52c2e165c480ef48a424f3ccf397ed67c97d6836
thermal: imx: fix calculation

Fix calculation. do_div can not handle negative values.
Use div_s64_rem to handle the calculation.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
drivers/thermal/imx_thermal.c