summaryrefslogtreecommitdiffstats
path: root/drivers/iio/pressure
diff options
context:
space:
mode:
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,
98 mutex_unlock(&data->lock); 98 mutex_unlock(&data->lock);
99 if (ret < 0) 99 if (ret < 0)
100 return ret; 100 return ret;
101 *val = sign_extend32(be32_to_cpu(tmp) >> 12, 23); 101 *val = be32_to_cpu(tmp) >> 12;
102 return IIO_VAL_INT; 102 return IIO_VAL_INT;
103 case IIO_TEMP: /* in 0.0625 celsius / LSB */ 103 case IIO_TEMP: /* in 0.0625 celsius / LSB */
104 mutex_lock(&data->lock); 104 mutex_lock(&data->lock);
@@ -112,7 +112,7 @@ static int mpl3115_read_raw(struct iio_dev *indio_dev,
112 mutex_unlock(&data->lock); 112 mutex_unlock(&data->lock);
113 if (ret < 0) 113 if (ret < 0)
114 return ret; 114 return ret;
115 *val = sign_extend32(be32_to_cpu(tmp) >> 20, 15); 115 *val = sign_extend32(be32_to_cpu(tmp) >> 20, 11);
116 return IIO_VAL_INT; 116 return IIO_VAL_INT;
117 default: 117 default:
118 return -EINVAL; 118 return -EINVAL;
@@ -185,7 +185,7 @@ static const struct iio_chan_spec mpl3115_channels[] = {
185 BIT(IIO_CHAN_INFO_SCALE), 185 BIT(IIO_CHAN_INFO_SCALE),
186 .scan_index = 0, 186 .scan_index = 0,
187 .scan_type = { 187 .scan_type = {
188 .sign = 's', 188 .sign = 'u',
189 .realbits = 20, 189 .realbits = 20,
190 .storagebits = 32, 190 .storagebits = 32,
191 .shift = 12, 191 .shift = 12,