diff options
author | Daniel Baluta <daniel.baluta@intel.com> | 2015-06-11 15:49:34 (GMT) |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2015-06-13 18:19:27 (GMT) |
commit | fd1883f07cb434707e50c4c9a16e3ed4b3a5e74f (patch) | |
tree | 5fa0ae40d7cdd3c770b8d67fa36237900b9d23cb /drivers/iio | |
parent | bdc10d57f236b534fb675a4bbefd10017aeb2b26 (diff) | |
download | linux-fd1883f07cb434707e50c4c9a16e3ed4b3a5e74f.tar.xz |
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 fa40f6d..bd26a48 100644 --- a/drivers/iio/proximity/sx9500.c +++ b/drivers/iio/proximity/sx9500.c @@ -206,7 +206,7 @@ static int sx9500_read_proximity(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; } |