projects
/
platform
/
kernel
/
linux-rpi3.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bdc10d5
)
iio: proximity: sx9500: Fix proximity value
author
Daniel Baluta
<daniel.baluta@intel.com>
Thu, 11 Jun 2015 15:49:34 +0000
(18:49 +0300)
committer
Jonathan Cameron
<jic23@kernel.org>
Sat, 13 Jun 2015 18:19:27 +0000
(19:19 +0100)
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>
drivers/iio/proximity/sx9500.c
patch
|
blob
|
history
diff --git
a/drivers/iio/proximity/sx9500.c
b/drivers/iio/proximity/sx9500.c
index
fa40f6d
..
bd26a48
100644
(file)
--- 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;
}