From: Michele Jr De Candia Date: Tue, 28 Jul 2009 14:33:03 +0000 (+0200) Subject: i2c/tsl2550: Fix lux value in dark environment X-Git-Tag: v2.6.27.30~25 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dd2d70a7ba542030c152cdc224d3d303e9b6e21a;p=pandora-kernel.git i2c/tsl2550: Fix lux value in dark environment commit 96f699ad09c8b3c55cd229506a9add0047838e3e upstream. I've tested TSL2550 driver and I've found a bug: when light is off, returned value from tsl2550_calculate_lux function is -1 when it should be 0 (sensor correctly read that light was off). I think the bug is that a zero c0 value (approximated value of ch0) is misinterpreted as an error. Signed-off-by: Michele Jr De Candia Acked-by: Rodolfo Giometti Signed-off-by: Jean Delvare Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed