]> git.hungrycats.org Git - linux/commitdiff
iio:inkern: Fix typo/bug in convert raw to processed.
authorMichael Hennerich <michael.hennerich@analog.com>
Mon, 3 Jun 2013 08:04:00 +0000 (09:04 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 13 Jun 2013 17:49:44 +0000 (10:49 -0700)
commit 6c5d4c96f979611f0165dc825af9e1cea8dd35b9 upstream.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Jonghwan Choi <jhbird.choi@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/iio/inkern.c

index b289915b8469774664ccd181cc0fa9883dda35d8..8ff1a2de1d9a7b5e3d339c9797517ee98d0c077a 100644 (file)
@@ -279,7 +279,7 @@ static int iio_convert_raw_to_processed_unlocked(struct iio_channel *chan,
        s64 raw64 = raw;
        int ret;
 
-       ret = iio_channel_read(chan, &offset, NULL, IIO_CHAN_INFO_SCALE);
+       ret = iio_channel_read(chan, &offset, NULL, IIO_CHAN_INFO_OFFSET);
        if (ret == 0)
                raw64 += offset;