aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/hid/hid-wiimote.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/hid/hid-wiimote.c b/drivers/hid/hid-wiimote.c
index 3416f69302cd..811ed8921013 100644
--- a/drivers/hid/hid-wiimote.c
+++ b/drivers/hid/hid-wiimote.c
@@ -26,6 +26,25 @@ struct wiimote_data {
26 struct input_dev *input; 26 struct input_dev *input;
27}; 27};
28 28
29static ssize_t wiimote_hid_send(struct hid_device *hdev, __u8 *buffer,
30 size_t count)
31{
32 __u8 *buf;
33 ssize_t ret;
34
35 if (!hdev->hid_output_raw_report)
36 return -ENODEV;
37
38 buf = kmemdup(buffer, count, GFP_KERNEL);
39 if (!buf)
40 return -ENOMEM;
41
42 ret = hdev->hid_output_raw_report(hdev, buf, count, HID_OUTPUT_REPORT);
43
44 kfree(buf);
45 return ret;
46}
47
29static int wiimote_input_event(struct input_dev *dev, unsigned int type, 48static int wiimote_input_event(struct input_dev *dev, unsigned int type,
30 unsigned int code, int value) 49 unsigned int code, int value)
31{ 50{