HID: cp2112: remove the last hid_output_raw_report() call
authorBenjamin Tissoires <benjamin.tissoires@redhat.com>
Sun, 9 Mar 2014 03:52:41 +0000 (22:52 -0500)
committerJiri Kosina <jkosina@suse.cz>
Fri, 14 Mar 2014 14:29:55 +0000 (15:29 +0100)
tests have shown that output reports use hid_hw_output_report().

Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-cp2112.c

index 3913eb9fec2aad6d87cc79ff7c752b13d9420d10..56be85a9a77c358d84a3aad0007f127d4992fe6d 100644 (file)
@@ -290,7 +290,12 @@ static int cp2112_hid_output(struct hid_device *hdev, u8 *data, size_t count,
        if (!buf)
                return -ENOMEM;
 
-       ret = hdev->hid_output_raw_report(hdev, buf, count, report_type);
+       if (report_type == HID_OUTPUT_REPORT)
+               ret = hid_hw_output_report(hdev, buf, count);
+       else
+               ret = hid_hw_raw_request(hdev, buf[0], buf, count, report_type,
+                               HID_REQ_SET_REPORT);
+
        kfree(buf);
        return ret;
 }