From: Jerome Oufella Date: Wed, 14 Apr 2010 14:14:07 +0000 (+0200) Subject: hwmon: (sht15) Fix sht15_calc_temp interpolation function X-Git-Tag: v2.6.34-rc5~18^2~6 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=328a2c22abd08911e37fa66f1358f829cecd72e9;p=pandora-kernel.git hwmon: (sht15) Fix sht15_calc_temp interpolation function I discovered two issues. First the previous sht15_calc_temp() loop did not iterate through the temppoints array since the (data->supply_uV > temppoints[i - 1].vdd) test is always true in this direction. Also the two-points linear interpolation function was returning biased values due to a stray division by 1000 which shouldn't be there. [JD: Also change the default value for d1 from 0 to something saner.] Signed-off-by: Jerome Oufella Acked-by: Jonathan Cameron Signed-off-by: Jean Delvare Cc: stable@kernel.org --- Reading git-diff-tree failed