diff options
author | Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> | 2015-02-19 15:35:26 -0800 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2015-02-23 15:20:00 +0100 |
commit | 3950e03389cfc8ee9d7131074d999b5fb6bbc2bf (patch) | |
tree | bbf036b38751363eb8d6c6c8f27225d49a5f6750 /drivers/iio/common/hid-sensors/hid-sensor-trigger.c | |
parent | 6adc83fca74ab73abcbd3b394cf3a8fd3701db99 (diff) | |
download | op-kernel-dev-3950e03389cfc8ee9d7131074d999b5fb6bbc2bf.zip op-kernel-dev-3950e03389cfc8ee9d7131074d999b5fb6bbc2bf.tar.gz |
HID: hid-sensor-hub: Enhance feature report set API
Current API only allows setting one offset in the field. This API
is extended to set multiple offsets in the field report.
Also update parameters in the users of this API.
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Reviewed-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/iio/common/hid-sensors/hid-sensor-trigger.c')
-rw-r--r-- | drivers/iio/common/hid-sensors/hid-sensor-trigger.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/iio/common/hid-sensors/hid-sensor-trigger.c b/drivers/iio/common/hid-sensors/hid-sensor-trigger.c index ef0c495..910e82a 100644 --- a/drivers/iio/common/hid-sensors/hid-sensor-trigger.c +++ b/drivers/iio/common/hid-sensors/hid-sensor-trigger.c @@ -64,15 +64,16 @@ int hid_sensor_power_state(struct hid_sensor_common *st, bool state) if (state_val >= 0) { state_val += st->power_state.logical_minimum; sensor_hub_set_feature(st->hsdev, st->power_state.report_id, - st->power_state.index, - (s32)state_val); + st->power_state.index, sizeof(state_val), + &state_val); } if (report_val >= 0) { report_val += st->report_state.logical_minimum; sensor_hub_set_feature(st->hsdev, st->report_state.report_id, - st->report_state.index, - (s32)report_val); + st->report_state.index, + sizeof(report_val), + &report_val); } sensor_hub_get_feature(st->hsdev, st->power_state.report_id, |