diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-12-03 07:55:28 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-12-03 07:55:28 +0100 |
commit | d5d12ce229c17fde99c6f8cc42f3701264a60e8c (patch) | |
tree | 9d3c4ec71ea8cab74d02b8311997630d651767eb /drivers/iio/accel | |
parent | staging: vchiq: add more tasks to the TODO list (diff) | |
parent | Linux 4.20-rc5 (diff) | |
download | linux-d5d12ce229c17fde99c6f8cc42f3701264a60e8c.tar.xz linux-d5d12ce229c17fde99c6f8cc42f3701264a60e8c.zip |
Merge 4.20-rc5 into staging-next
We need the staging fixes in here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/iio/accel')
-rw-r--r-- | drivers/iio/accel/hid-sensor-accel-3d.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/iio/accel/hid-sensor-accel-3d.c b/drivers/iio/accel/hid-sensor-accel-3d.c index 41d97faf5013..38ff374a3ca4 100644 --- a/drivers/iio/accel/hid-sensor-accel-3d.c +++ b/drivers/iio/accel/hid-sensor-accel-3d.c @@ -149,6 +149,7 @@ static int accel_3d_read_raw(struct iio_dev *indio_dev, int report_id = -1; u32 address; int ret_type; + s32 min; struct hid_sensor_hub_device *hsdev = accel_state->common_attributes.hsdev; @@ -158,12 +159,14 @@ static int accel_3d_read_raw(struct iio_dev *indio_dev, case IIO_CHAN_INFO_RAW: hid_sensor_power_state(&accel_state->common_attributes, true); report_id = accel_state->accel[chan->scan_index].report_id; + min = accel_state->accel[chan->scan_index].logical_minimum; address = accel_3d_addresses[chan->scan_index]; if (report_id >= 0) *val = sensor_hub_input_attr_get_raw_value( accel_state->common_attributes.hsdev, hsdev->usage, address, report_id, - SENSOR_HUB_SYNC); + SENSOR_HUB_SYNC, + min < 0); else { *val = 0; hid_sensor_power_state(&accel_state->common_attributes, |