From: Alexandre Belloni Date: Mon, 1 Jul 2013 16:40:00 +0000 (+0100) Subject: iio: inkern: fix iio_convert_raw_to_processed_unlocked X-Git-Tag: v3.11-rc2~3^2^2~6 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f91d1b63a4e096d3023aaaafec9d9d3aff25997f;p=pandora-kernel.git iio: inkern: fix iio_convert_raw_to_processed_unlocked When reading IIO_CHAN_INFO_OFFSET, the return value of iio_channel_read() for success will be IIO_VAL*, checking for 0 is not correct. Without this fix the offset applied by iio drivers will be ignored when converting a raw value to one in appropriate base units (e.g mV) in a IIO client drivers that use iio_convert_raw_to_processed including iio-hwmon. Cc: # 3.10.x Signed-off-by: Alexandre Belloni Signed-off-by: Jonathan Cameron --- Reading git-diff-tree failed