]> git.baikalelectronics.ru Git - kernel.git/commit
iio: iio: Fix iio_channel_read return if channel havn't info
authorFabien Proriol <fabien.proriol@jdsu.com>
Thu, 1 Jan 2015 12:46:48 +0000 (12:46 +0000)
committerJonathan Cameron <jic23@kernel.org>
Thu, 1 Jan 2015 12:46:48 +0000 (12:46 +0000)
commit6c6ed883a36c22e8dc17394b2dfa8ca4c98a1325
treefdb99856165a72ffa2b217c9fddc66e22caa5116
parent6e2bf1a0323410766dbfe4f1baa9b74091be05d3
iio: iio: Fix iio_channel_read return if channel havn't info

When xilinx-xadc is used with hwmon driver to read voltage, offset used
for temperature is always applied whatever the channel.

iio_channel_read must return an error to avoid offset for channel
without IIO_CHAN_INFO_OFFSET property.

Signed-off-by: Fabien Proriol <fabien.proriol@jdsu.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/inkern.c