summaryrefslogtreecommitdiffstats
path: root/kernel/drivers/iio/proximity
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/drivers/iio/proximity')
-rw-r--r--kernel/drivers/iio/proximity/sx9500.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/drivers/iio/proximity/sx9500.c b/kernel/drivers/iio/proximity/sx9500.c
index fa40f6d0c..bd26a484a 100644
--- a/kernel/drivers/iio/proximity/sx9500.c
+++ b/kernel/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;
}