diff options
author | Stephen Rothwell <sfr@canb.auug.org.au> | 2010-02-04 11:28:46 +1100 |
---|---|---|
committer | Stephen Rothwell <sfr@canb.auug.org.au> | 2010-02-04 11:28:46 +1100 |
commit | d6a46e76111a2fbe5d7d5a5c13c966c8df01a007 (patch) | |
tree | cadfa5c24b78627bd7f135a74dbb7c51ff854cee /net | |
parent | fcac7a630c9477b11c5bd54eb747a3b51e11b0e4 (diff) | |
parent | 5224380ffa49b8670a44d41021dff5d739698f0d (diff) |
Merge remote branch 'hid/for-next'
Diffstat (limited to 'net')
-rw-r--r-- | net/bluetooth/hidp/core.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/net/bluetooth/hidp/core.c b/net/bluetooth/hidp/core.c index 6cf526d06e21..37ba153c4cd4 100644 --- a/net/bluetooth/hidp/core.c +++ b/net/bluetooth/hidp/core.c @@ -313,10 +313,21 @@ static int hidp_send_report(struct hidp_session *session, struct hid_report *rep return hidp_queue_report(session, buf, rsize); } -static int hidp_output_raw_report(struct hid_device *hid, unsigned char *data, size_t count) +static int hidp_output_raw_report(struct hid_device *hid, unsigned char *data, size_t count, + unsigned char report_type) { - if (hidp_send_ctrl_message(hid->driver_data, - HIDP_TRANS_SET_REPORT | HIDP_DATA_RTYPE_FEATURE, + switch (report_type) { + case HID_FEATURE_REPORT: + report_type = HIDP_TRANS_SET_REPORT | HIDP_DATA_RTYPE_FEATURE; + break; + case HID_OUTPUT_REPORT: + report_type = HIDP_TRANS_DATA | HIDP_DATA_RTYPE_OUPUT; + break; + default: + return -EINVAL; + } + + if (hidp_send_ctrl_message(hid->driver_data, report_type, data, count)) return -ENOMEM; return count; |