|
@@ -326,7 +326,8 @@ int sensor_hub_input_get_attribute_info(struct hid_sensor_hub_device *hsdev,
|
|
field->logical == attr_usage_id) {
|
|
field->logical == attr_usage_id) {
|
|
sensor_hub_fill_attr_info(info, i, report->id,
|
|
sensor_hub_fill_attr_info(info, i, report->id,
|
|
field->unit, field->unit_exponent,
|
|
field->unit, field->unit_exponent,
|
|
- field->report_size);
|
|
|
|
|
|
+ field->report_size *
|
|
|
|
+ field->report_count);
|
|
ret = 0;
|
|
ret = 0;
|
|
} else {
|
|
} else {
|
|
for (j = 0; j < field->maxusage; ++j) {
|
|
for (j = 0; j < field->maxusage; ++j) {
|
|
@@ -338,7 +339,8 @@ int sensor_hub_input_get_attribute_info(struct hid_sensor_hub_device *hsdev,
|
|
i, report->id,
|
|
i, report->id,
|
|
field->unit,
|
|
field->unit,
|
|
field->unit_exponent,
|
|
field->unit_exponent,
|
|
- field->report_size);
|
|
|
|
|
|
+ field->report_size *
|
|
|
|
+ field->report_count);
|
|
ret = 0;
|
|
ret = 0;
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
@@ -425,9 +427,10 @@ static int sensor_hub_raw_event(struct hid_device *hdev,
|
|
hid_dbg(hdev, "%d collection_index:%x hid:%x sz:%x\n",
|
|
hid_dbg(hdev, "%d collection_index:%x hid:%x sz:%x\n",
|
|
i, report->field[i]->usage->collection_index,
|
|
i, report->field[i]->usage->collection_index,
|
|
report->field[i]->usage->hid,
|
|
report->field[i]->usage->hid,
|
|
- report->field[i]->report_size/8);
|
|
|
|
-
|
|
|
|
- sz = report->field[i]->report_size/8;
|
|
|
|
|
|
+ (report->field[i]->report_size *
|
|
|
|
+ report->field[i]->report_count)/8);
|
|
|
|
+ sz = (report->field[i]->report_size *
|
|
|
|
+ report->field[i]->report_count)/8;
|
|
if (pdata->pending.status && pdata->pending.attr_usage_id ==
|
|
if (pdata->pending.status && pdata->pending.attr_usage_id ==
|
|
report->field[i]->usage->hid) {
|
|
report->field[i]->usage->hid) {
|
|
hid_dbg(hdev, "data was pending ...\n");
|
|
hid_dbg(hdev, "data was pending ...\n");
|