aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hid
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/hid')
-rw-r--r--drivers/hid/hid-sensor-hub.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/drivers/hid/hid-sensor-hub.c b/drivers/hid/hid-sensor-hub.c
index 10e1581022cf..9e4cdca549c0 100644
--- a/drivers/hid/hid-sensor-hub.c
+++ b/drivers/hid/hid-sensor-hub.c
@@ -326,7 +326,8 @@ int sensor_hub_input_get_attribute_info(struct hid_sensor_hub_device *hsdev,
326 field->logical == attr_usage_id) { 326 field->logical == attr_usage_id) {
327 sensor_hub_fill_attr_info(info, i, report->id, 327 sensor_hub_fill_attr_info(info, i, report->id,
328 field->unit, field->unit_exponent, 328 field->unit, field->unit_exponent,
329 field->report_size); 329 field->report_size *
330 field->report_count);
330 ret = 0; 331 ret = 0;
331 } else { 332 } else {
332 for (j = 0; j < field->maxusage; ++j) { 333 for (j = 0; j < field->maxusage; ++j) {
@@ -338,7 +339,8 @@ int sensor_hub_input_get_attribute_info(struct hid_sensor_hub_device *hsdev,
338 i, report->id, 339 i, report->id,
339 field->unit, 340 field->unit,
340 field->unit_exponent, 341 field->unit_exponent,
341 field->report_size); 342 field->report_size *
343 field->report_count);
342 ret = 0; 344 ret = 0;
343 break; 345 break;
344 } 346 }
@@ -425,9 +427,10 @@ static int sensor_hub_raw_event(struct hid_device *hdev,
425 hid_dbg(hdev, "%d collection_index:%x hid:%x sz:%x\n", 427 hid_dbg(hdev, "%d collection_index:%x hid:%x sz:%x\n",
426 i, report->field[i]->usage->collection_index, 428 i, report->field[i]->usage->collection_index,
427 report->field[i]->usage->hid, 429 report->field[i]->usage->hid,
428 report->field[i]->report_size/8); 430 (report->field[i]->report_size *
429 431 report->field[i]->report_count)/8);
430 sz = report->field[i]->report_size/8; 432 sz = (report->field[i]->report_size *
433 report->field[i]->report_count)/8;
431 if (pdata->pending.status && pdata->pending.attr_usage_id == 434 if (pdata->pending.status && pdata->pending.attr_usage_id ==
432 report->field[i]->usage->hid) { 435 report->field[i]->usage->hid) {
433 hid_dbg(hdev, "data was pending ...\n"); 436 hid_dbg(hdev, "data was pending ...\n");