diff options
author | Greg Kroah-Hartman | 2016-04-11 09:30:50 -0700 |
---|---|---|
committer | Greg Kroah-Hartman | 2016-04-11 09:30:50 -0700 |
commit | 5f47992491ffe2d5b2b4ea3556bc0f3c0ec9bc8b (patch) | |
tree | f43f81ab67d152c148bd3dfc1a0683d2c8306014 /drivers/iio/gyro | |
parent | 148e45dc87cb76ba89e80da264bc692cc91a5149 (diff) | |
parent | bf16200689118d19de1b8d2a3c314fc21f5dc7bb (diff) |
Merge 4.6-rc3 into staging-next
This resolves a lot of merge issues with PAGE_CACHE_* changes, and an
iio driver merge issue.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/iio/gyro')
-rw-r--r-- | drivers/iio/gyro/bmg160_core.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/iio/gyro/bmg160_core.c b/drivers/iio/gyro/bmg160_core.c index 2493bb17a03d..dd2f850a2f0b 100644 --- a/drivers/iio/gyro/bmg160_core.c +++ b/drivers/iio/gyro/bmg160_core.c @@ -451,7 +451,7 @@ static int bmg160_get_temp(struct bmg160_data *data, int *val) static int bmg160_get_axis(struct bmg160_data *data, int axis, int *val) { int ret; - unsigned int raw_val; + __le16 raw_val; mutex_lock(&data->mutex); ret = bmg160_set_power_state(data, true); @@ -461,7 +461,7 @@ static int bmg160_get_axis(struct bmg160_data *data, int axis, int *val) } ret = regmap_bulk_read(data->regmap, BMG160_AXIS_TO_REG(axis), &raw_val, - 2); + sizeof(raw_val)); if (ret < 0) { dev_err(data->dev, "Error reading axis %d\n", axis); bmg160_set_power_state(data, false); @@ -469,7 +469,7 @@ static int bmg160_get_axis(struct bmg160_data *data, int axis, int *val) return ret; } - *val = sign_extend32(raw_val, 15); + *val = sign_extend32(le16_to_cpu(raw_val), 15); ret = bmg160_set_power_state(data, false); mutex_unlock(&data->mutex); if (ret < 0) |