summaryrefslogtreecommitdiff
path: root/drivers/iio/pressure
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-06-22 20:33:51 +0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-06-22 20:33:51 +0400
commitef7994fa2aecd8d1fb0d75034caa050ff908d26a (patch)
treeaa7bbe9499256ced149dce70891de5eedf33c283 /drivers/iio/pressure
parentad8686bc05adc2b8301d749f5958bd904f3a46ee (diff)
parenta497c3ba1d97fc69c1e78e7b96435ba8c2cb42ee (diff)
downloadlinux-ef7994fa2aecd8d1fb0d75034caa050ff908d26a.tar.xz
Merge 3.16-rc2 into staging-next
We want the staging fixes here as well.
Diffstat (limited to 'drivers/iio/pressure')
-rw-r--r--drivers/iio/pressure/mpl3115.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/iio/pressure/mpl3115.c b/drivers/iio/pressure/mpl3115.c
index ba6d0c520e63..01b2e0b18878 100644
--- a/drivers/iio/pressure/mpl3115.c
+++ b/drivers/iio/pressure/mpl3115.c
@@ -98,7 +98,7 @@ static int mpl3115_read_raw(struct iio_dev *indio_dev,
mutex_unlock(&data->lock);
if (ret < 0)
return ret;
- *val = sign_extend32(be32_to_cpu(tmp) >> 12, 23);
+ *val = be32_to_cpu(tmp) >> 12;
return IIO_VAL_INT;
case IIO_TEMP: /* in 0.0625 celsius / LSB */
mutex_lock(&data->lock);
@@ -112,7 +112,7 @@ static int mpl3115_read_raw(struct iio_dev *indio_dev,
mutex_unlock(&data->lock);
if (ret < 0)
return ret;
- *val = sign_extend32(be32_to_cpu(tmp) >> 20, 15);
+ *val = sign_extend32(be32_to_cpu(tmp) >> 20, 11);
return IIO_VAL_INT;
default:
return -EINVAL;
@@ -185,7 +185,7 @@ static const struct iio_chan_spec mpl3115_channels[] = {
BIT(IIO_CHAN_INFO_SCALE),
.scan_index = 0,
.scan_type = {
- .sign = 's',
+ .sign = 'u',
.realbits = 20,
.storagebits = 32,
.shift = 12,