diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-12-08 18:49:05 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-12-08 18:49:05 -0800 |
commit | 2d4d4a8ddeb70f6d3eca23fb2f0585472368b9e5 (patch) | |
tree | 67f58eec0860fecbbf476cb82424f593ac304f6c /drivers/hid/hid-sensor-hub.c | |
parent | f64001ef16312e94deb28297f5ffd4ada3e32ae9 (diff) | |
parent | 55ef003e4ae684d5660f984eb2352df12572d9df (diff) |
Merge tag 'staging-3.13-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging
Pull staging driver fixes from Greg KH:
"Here are some bugfixes for the staging and IIO drivers for 3.13-rc3.
The resolve the vm memory issue in the tidspbridge driver, fix a
much-reported build failure in an ARM driver, and some other IIO
bugfixes that have been reported"
* tag 'staging-3.13-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
Staging: TIDSPBRIDGE: Use vm_iomap_memory for mmap-ing instead of remap_pfn_range
Fix build failure for gp2ap020a00f.c
iio: hid-sensors: Fix power and report state
HID: hid-sensor-hub: Add logical min and max
Diffstat (limited to 'drivers/hid/hid-sensor-hub.c')
-rw-r--r-- | drivers/hid/hid-sensor-hub.c | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/drivers/hid/hid-sensor-hub.c b/drivers/hid/hid-sensor-hub.c index a184e1921c1..d87f7cb4bee 100644 --- a/drivers/hid/hid-sensor-hub.c +++ b/drivers/hid/hid-sensor-hub.c @@ -112,13 +112,15 @@ static int sensor_hub_get_physical_device_count( static void sensor_hub_fill_attr_info( struct hid_sensor_hub_attribute_info *info, - s32 index, s32 report_id, s32 units, s32 unit_expo, s32 size) + s32 index, s32 report_id, struct hid_field *field) { info->index = index; info->report_id = report_id; - info->units = units; - info->unit_expo = unit_expo; - info->size = size/8; + info->units = field->unit; + info->unit_expo = field->unit_exponent; + info->size = (field->report_size * field->report_count)/8; + info->logical_minimum = field->logical_minimum; + info->logical_maximum = field->logical_maximum; } static struct hid_sensor_hub_callbacks *sensor_hub_get_callback( @@ -325,9 +327,7 @@ int sensor_hub_input_get_attribute_info(struct hid_sensor_hub_device *hsdev, if (field->physical == usage_id && field->logical == attr_usage_id) { sensor_hub_fill_attr_info(info, i, report->id, - field->unit, field->unit_exponent, - field->report_size * - field->report_count); + field); ret = 0; } else { for (j = 0; j < field->maxusage; ++j) { @@ -336,11 +336,7 @@ int sensor_hub_input_get_attribute_info(struct hid_sensor_hub_device *hsdev, field->usage[j].collection_index == collection_index) { sensor_hub_fill_attr_info(info, - i, report->id, - field->unit, - field->unit_exponent, - field->report_size * - field->report_count); + i, report->id, field); ret = 0; break; } |