diff options
Diffstat (limited to 'drivers/iio/common/hid-sensors/hid-sensor-trigger.c')
-rw-r--r-- | drivers/iio/common/hid-sensors/hid-sensor-trigger.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/iio/common/hid-sensors/hid-sensor-trigger.c b/drivers/iio/common/hid-sensors/hid-sensor-trigger.c index 2f1d535b94c4..610fc98f88ef 100644 --- a/drivers/iio/common/hid-sensors/hid-sensor-trigger.c +++ b/drivers/iio/common/hid-sensors/hid-sensor-trigger.c | |||
@@ -68,20 +68,21 @@ static int _hid_sensor_power_state(struct hid_sensor_common *st, bool state) | |||
68 | if (state_val >= 0) { | 68 | if (state_val >= 0) { |
69 | state_val += st->power_state.logical_minimum; | 69 | state_val += st->power_state.logical_minimum; |
70 | sensor_hub_set_feature(st->hsdev, st->power_state.report_id, | 70 | sensor_hub_set_feature(st->hsdev, st->power_state.report_id, |
71 | st->power_state.index, | 71 | st->power_state.index, sizeof(state_val), |
72 | (s32)state_val); | 72 | &state_val); |
73 | } | 73 | } |
74 | 74 | ||
75 | if (report_val >= 0) { | 75 | if (report_val >= 0) { |
76 | report_val += st->report_state.logical_minimum; | 76 | report_val += st->report_state.logical_minimum; |
77 | sensor_hub_set_feature(st->hsdev, st->report_state.report_id, | 77 | sensor_hub_set_feature(st->hsdev, st->report_state.report_id, |
78 | st->report_state.index, | 78 | st->report_state.index, |
79 | (s32)report_val); | 79 | sizeof(report_val), |
80 | &report_val); | ||
80 | } | 81 | } |
81 | 82 | ||
82 | sensor_hub_get_feature(st->hsdev, st->power_state.report_id, | 83 | sensor_hub_get_feature(st->hsdev, st->power_state.report_id, |
83 | st->power_state.index, | 84 | st->power_state.index, |
84 | &state_val); | 85 | sizeof(state_val), &state_val); |
85 | if (state && poll_value) | 86 | if (state && poll_value) |
86 | msleep_interruptible(poll_value * 2); | 87 | msleep_interruptible(poll_value * 2); |
87 | 88 | ||