diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-03-22 12:02:01 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-03-22 12:02:01 +0100 |
commit | 43c49938bf72b2862aa12b5d66e710e15ce0f7b7 (patch) | |
tree | b1a0bb2e280877db1a6391b61717389f51137b4b /drivers/iio/common | |
parent | 4495c08e84729385774601b5146d51d9e5849f81 (diff) | |
parent | 6985bd5e21901c2d2bfc924b114887e20c002901 (diff) |
Merge tag 'iio-fixes-for-4.11c' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-linus
Jonathan writes:
Thirds set of IIO fixes for the 4.11 cycle.
* core
- iio sw-device - ensure configfs is enabled both when building as module
and built in.
* ak8974
- drop incorrect __exit markup on remove.
* hid-sensor-trigger
- code reorganise to avoid losing settings if a power cycle occurs during S3.
* lsm6dsx
- fix incorrect overwrite of parts of FIFO_CTRL2 register during watermark
configuration.
* ti-am335x
- fix a hard to hit bug when reenabling from a fifo overrun by waiting for
current cycle to finish.
Diffstat (limited to 'drivers/iio/common')
-rw-r--r-- | drivers/iio/common/hid-sensors/hid-sensor-trigger.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/iio/common/hid-sensors/hid-sensor-trigger.c b/drivers/iio/common/hid-sensors/hid-sensor-trigger.c index a3cce3a38300..ecf592d69043 100644 --- a/drivers/iio/common/hid-sensors/hid-sensor-trigger.c +++ b/drivers/iio/common/hid-sensors/hid-sensor-trigger.c @@ -51,8 +51,6 @@ static int _hid_sensor_power_state(struct hid_sensor_common *st, bool state) st->report_state.report_id, st->report_state.index, HID_USAGE_SENSOR_PROP_REPORTING_STATE_ALL_EVENTS_ENUM); - - poll_value = hid_sensor_read_poll_value(st); } else { int val; @@ -89,7 +87,9 @@ static int _hid_sensor_power_state(struct hid_sensor_common *st, bool state) sensor_hub_get_feature(st->hsdev, st->power_state.report_id, st->power_state.index, sizeof(state_val), &state_val); - if (state && poll_value) + if (state) + poll_value = hid_sensor_read_poll_value(st); + if (poll_value > 0) msleep_interruptible(poll_value * 2); return 0; |