diff options
Diffstat (limited to 'net/bluetooth/hidp')
-rw-r--r-- | net/bluetooth/hidp/core.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/net/bluetooth/hidp/core.c b/net/bluetooth/hidp/core.c index 13a0a0590947..940f5acb6694 100644 --- a/net/bluetooth/hidp/core.c +++ b/net/bluetooth/hidp/core.c | |||
@@ -335,14 +335,11 @@ static int hidp_output_raw_report(struct hid_device *hid, unsigned char *data, s | |||
335 | struct hidp_session *session = hid->driver_data; | 335 | struct hidp_session *session = hid->driver_data; |
336 | int ret; | 336 | int ret; |
337 | 337 | ||
338 | switch (report_type) { | 338 | if (report_type == HID_OUTPUT_REPORT) { |
339 | case HID_FEATURE_REPORT: | ||
340 | report_type = HIDP_TRANS_SET_REPORT | HIDP_DATA_RTYPE_FEATURE; | ||
341 | break; | ||
342 | case HID_OUTPUT_REPORT: | ||
343 | report_type = HIDP_TRANS_DATA | HIDP_DATA_RTYPE_OUPUT; | 339 | report_type = HIDP_TRANS_DATA | HIDP_DATA_RTYPE_OUPUT; |
344 | break; | 340 | return hidp_send_intr_message(session, report_type, |
345 | default: | 341 | data, count); |
342 | } else if (report_type != HID_FEATURE_REPORT) { | ||
346 | return -EINVAL; | 343 | return -EINVAL; |
347 | } | 344 | } |
348 | 345 | ||
@@ -351,6 +348,7 @@ static int hidp_output_raw_report(struct hid_device *hid, unsigned char *data, s | |||
351 | 348 | ||
352 | /* Set up our wait, and send the report request to the device. */ | 349 | /* Set up our wait, and send the report request to the device. */ |
353 | set_bit(HIDP_WAITING_FOR_SEND_ACK, &session->flags); | 350 | set_bit(HIDP_WAITING_FOR_SEND_ACK, &session->flags); |
351 | report_type = HIDP_TRANS_SET_REPORT | HIDP_DATA_RTYPE_FEATURE; | ||
354 | ret = hidp_send_ctrl_message(session, report_type, data, count); | 352 | ret = hidp_send_ctrl_message(session, report_type, data, count); |
355 | if (ret) | 353 | if (ret) |
356 | goto err; | 354 | goto err; |