aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hid/hid-sensor-hub.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-11-15 19:48:22 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2013-11-15 19:48:22 -0500
commite0da5c9a49b927d9e5f62b21a7abc283e99022e2 (patch)
treec73688d7e30737f75efdc4a4f01d79fb7deb1833 /drivers/hid/hid-sensor-hub.c
parent9073e1a804c3096eda84ee7cbf11d1f174236c75 (diff)
parent7f9cc24a805ce444e082c01f9818f2d3a25ef268 (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid
Pull HID updates from Jiri Kosina: - i2c-hid is not querying init reports any more, as it's not mandated by the spec, and annoys quite a few devices during enumeration, by Bibek Basu - a lot of fixes for Logitech devices, by Simon Wood - hid-apple now has an option to switch between Option and Command mode, by Nanno Langstraat - Some more workarounds for severely broken ELO devices, by Oliver Neukum - more devm conversions, by Benjamin Tissoires - wiimote correctness fixes, by David Herrmann - a lot of added support for various new device IDs and random small fixes here and there" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid: (34 commits) HID: enable Mayflash USB Gamecube Adapter HID: sony: Add force feedback support for Dualshock3 USB Input: usbtouchscreen: ignore eGalax/D-Wav/EETI HIDs HID: don't ignore eGalax/D-Wav/EETI HIDs HID: roccat: add missing special driver declarations HID:hid-lg4ff: Correct Auto-center strength for wheels other than MOMO and MOMO2 HID:hid-lg4ff: Initialize device properties before we touch autocentering. HID:hid-lg4ff: ensure ConstantForce is disabled when set to 0 HID:hid-lg4ff: Switch autocentering off when strength is set to zero. HID:hid-lg4ff: Scale autocentering force properly on Logitech wheel HID: roccat: fix Coverity CID 141438 HID: multitouch: add manufacturer to Kconfig help text HID: logitech-dj: small cleanup in rdcat() HID: remove self-assignment from hid_input_report HID: hid-sensor-hub: fix report size HID: i2c-hid: Stop querying for init reports HID: roccat: add support for Ryos MK keyboards HID: roccat: generalize some common code HID: roccat: add new device return value HID: wiimote: add pro-controller analog stick calibration ...
Diffstat (limited to 'drivers/hid/hid-sensor-hub.c')
-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 88fc5aefcd96..a184e1921c11 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");