diff options
author | Daniel Baluta <daniel.baluta@intel.com> | 2015-06-11 18:49:34 +0300 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2015-07-19 11:48:04 +0100 |
commit | 86d24f04f9a0a7bad8e1719e5aa464eb5779e678 (patch) | |
tree | d509cfe735bb18c46333a0262802f46898d378cb /drivers/iio | |
parent | 63fc444967591c3849438aa0f21d5de96a928311 (diff) | |
download | linux-86d24f04f9a0a7bad8e1719e5aa464eb5779e678.tar.gz linux-86d24f04f9a0a7bad8e1719e5aa464eb5779e678.tar.bz2 linux-86d24f04f9a0a7bad8e1719e5aa464eb5779e678.zip |
iio: proximity: sx9500: Fix proximity value
Because of the ABI confusion proximity value exposed by SX9500
was inverted.
Signed-off-by: Daniel Baluta <daniel.baluta@intel.com>
Reviewed-by: Vlad Dogaru <vlad.dogaru@intel.com>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/iio')
-rw-r--r-- | drivers/iio/proximity/sx9500.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iio/proximity/sx9500.c b/drivers/iio/proximity/sx9500.c index 2042e375f835..01494cd6fa32 100644 --- a/drivers/iio/proximity/sx9500.c +++ b/drivers/iio/proximity/sx9500.c @@ -281,7 +281,7 @@ static int sx9500_read_prox_data(struct sx9500_data *data, if (ret < 0) return ret; - *val = 32767 - (s16)be16_to_cpu(regval); + *val = be16_to_cpu(regval); return IIO_VAL_INT; } |