From 269ddfc68a49ed885a32c4d6bedb088bd3312b8c Mon Sep 17 00:00:00 2001 From: "K. Y. Srinivasan" Date: Fri, 28 Mar 2014 17:41:27 -0700 Subject: HID: hyperv: Implement a stub raw_request() entry point commit 3c86726cfe38 ("HID: make .raw_request mandatory") made .raw_request mandatory and broke the Hyper-V mouse driver. This patch fixes the problem. Signed-off-by: K. Y. Srinivasan Reviewed-by: Benjamin Tissoires Signed-off-by: Jiri Kosina --- drivers/hid/hid-hyperv.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'drivers/hid/hid-hyperv.c') diff --git a/drivers/hid/hid-hyperv.c b/drivers/hid/hid-hyperv.c index 8fae6d1414cc..866e6a86203c 100644 --- a/drivers/hid/hid-hyperv.c +++ b/drivers/hid/hid-hyperv.c @@ -455,12 +455,22 @@ static void mousevsc_hid_stop(struct hid_device *hid) { } +static int mousevsc_hid_raw_request(struct hid_device *hid, + unsigned char report_num, + __u8 buf, size_t len, + unsigned char rtype, + int reqtype) +{ + return 0; +} + static struct hid_ll_driver mousevsc_ll_driver = { .parse = mousevsc_hid_parse, .open = mousevsc_hid_open, .close = mousevsc_hid_close, .start = mousevsc_hid_start, .stop = mousevsc_hid_stop, + .raw_request = mousevsc_hid_raw_request, }; static struct hid_driver mousevsc_hid_driver; -- cgit v1.2.3 From c3d77fab51f40821de91a744e4b514e9e4e76a7c Mon Sep 17 00:00:00 2001 From: Jiri Kosina Date: Fri, 28 Mar 2014 18:40:42 -0700 Subject: HID: hyperv: fix _raw_request() prototype The 3rd argument is pointer to the buffer, not a single __u8. This has no bad sideeffect, as the stub is not using any of its argument, but better have it correct. Signed-off-by: Jiri Kosina --- drivers/hid/hid-hyperv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/hid/hid-hyperv.c') diff --git a/drivers/hid/hid-hyperv.c b/drivers/hid/hid-hyperv.c index 866e6a86203c..0658cc4578fe 100644 --- a/drivers/hid/hid-hyperv.c +++ b/drivers/hid/hid-hyperv.c @@ -457,7 +457,7 @@ static void mousevsc_hid_stop(struct hid_device *hid) static int mousevsc_hid_raw_request(struct hid_device *hid, unsigned char report_num, - __u8 buf, size_t len, + __u8 *buf, size_t len, unsigned char rtype, int reqtype) { -- cgit v1.2.3