Skip to content

Commit

Permalink
HID: wiimote: replace hid_output_raw_report with hid_hw_output_report…
Browse files Browse the repository at this point in the history
… for output requests

For BT transport layer,
  ret = hid_output_raw_report(A, B, C, HID_OUTPUT_REPORT);
is equivalent to
  ret = hid_hw_output_report(A, B, C);

So use the new API where available

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
  • Loading branch information
Benjamin Tissoires authored and Jiri Kosina committed Feb 17, 2014
1 parent b0dd72a commit 7e0bc88
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/hid/hid-wiimote-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@ static int wiimote_hid_send(struct hid_device *hdev, __u8 *buffer,
__u8 *buf;
int ret;

if (!hdev->hid_output_raw_report)
if (!hdev->ll_driver->output_report)
return -ENODEV;

buf = kmemdup(buffer, count, GFP_KERNEL);
if (!buf)
return -ENOMEM;

ret = hid_output_raw_report(hdev, buf, count, HID_OUTPUT_REPORT);
ret = hid_hw_output_report(hdev, buf, count);

kfree(buf);
return ret;
Expand Down

0 comments on commit 7e0bc88

Please sign in to comment.