diff options
author | Daniel Baluta <daniel.baluta@intel.com> | 2015-06-11 18:49:34 +0300 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2015-06-13 19:19:27 +0100 |
commit | fd1883f07cb434707e50c4c9a16e3ed4b3a5e74f (patch) | |
tree | 5fa0ae40d7cdd3c770b8d67fa36237900b9d23cb /drivers/iio/proximity | |
parent | bdc10d57f236b534fb675a4bbefd10017aeb2b26 (diff) |
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/proximity')
-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 fa40f6d0ca39..bd26a484abcc 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; } |