From: Daniel Baluta Date: Fri, 5 Jun 2015 11:03:12 +0000 (+0300) Subject: iio: magnetometer: mmc35240: Fix broken processed value X-Git-Tag: omap-for-v4.3/legacy-v2-signed~121^2~256^2~12 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c2890547a035e019df646be5d56adc0ee1b0a327;p=pandora-kernel.git iio: magnetometer: mmc35240: Fix broken processed value The current computation for fractional part of the magnetic field is broken. This patch fixes it by taking a different approach. We expose the raw reading in milli Gauss (to avoid rounding errors) with a scale of 0.001. Thus the final computation is done in userspace where floating point operation are more relaxed. Fixes: abeb6b1e7b ("iio: magnetometer: Add support for MEMSIC MMC35240") Signed-off-by: Daniel Baluta Signed-off-by: Jonathan Cameron --- Reading git-diff-tree failed