Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 349458
b: refs/heads/master
c: c284979
h: refs/heads/master
v: v3
  • Loading branch information
Benjamin Tissoires authored and Jiri Kosina committed Jan 31, 2013
1 parent 2fecb97 commit efe4661
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 320cde19a4e8f122b19d2df7a5c00636e11ca3fb
refs/heads/master: c284979affcc6870a9a6545fc4b1adb3816dfcbf
13 changes: 12 additions & 1 deletion trunk/drivers/hid/i2c-hid/i2c-hid.c
Original file line number Diff line number Diff line change
Expand Up @@ -540,13 +540,24 @@ static int i2c_hid_output_raw_report(struct hid_device *hid, __u8 *buf,
{
struct i2c_client *client = hid->driver_data;
int report_id = buf[0];
int ret;

if (report_type == HID_INPUT_REPORT)
return -EINVAL;

return i2c_hid_set_report(client,
if (report_id) {
buf++;
count--;
}

ret = i2c_hid_set_report(client,
report_type == HID_FEATURE_REPORT ? 0x03 : 0x02,
report_id, buf, count);

if (report_id && ret >= 0)
ret++; /* add report_id to the number of transfered bytes */

return ret;
}

static int i2c_hid_parse(struct hid_device *hid)
Expand Down

0 comments on commit efe4661

Please sign in to comment.