diff options
Diffstat (limited to 'drivers/hid/hid-hyperv.c')
-rw-r--r-- | drivers/hid/hid-hyperv.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/drivers/hid/hid-hyperv.c b/drivers/hid/hid-hyperv.c index 406632472c1b..3d62781b8993 100644 --- a/drivers/hid/hid-hyperv.c +++ b/drivers/hid/hid-hyperv.c | |||
@@ -430,6 +430,15 @@ cleanup: | |||
430 | return ret; | 430 | return ret; |
431 | } | 431 | } |
432 | 432 | ||
433 | static int mousevsc_hid_parse(struct hid_device *hid) | ||
434 | { | ||
435 | struct hv_device *dev = hid_get_drvdata(hid); | ||
436 | struct mousevsc_dev *input_dev = hv_get_drvdata(dev); | ||
437 | |||
438 | return hid_parse_report(hid, input_dev->report_desc, | ||
439 | input_dev->report_desc_size); | ||
440 | } | ||
441 | |||
433 | static int mousevsc_hid_open(struct hid_device *hid) | 442 | static int mousevsc_hid_open(struct hid_device *hid) |
434 | { | 443 | { |
435 | return 0; | 444 | return 0; |
@@ -449,6 +458,7 @@ static void mousevsc_hid_stop(struct hid_device *hid) | |||
449 | } | 458 | } |
450 | 459 | ||
451 | static struct hid_ll_driver mousevsc_ll_driver = { | 460 | static struct hid_ll_driver mousevsc_ll_driver = { |
461 | .parse = mousevsc_hid_parse, | ||
452 | .open = mousevsc_hid_open, | 462 | .open = mousevsc_hid_open, |
453 | .close = mousevsc_hid_close, | 463 | .close = mousevsc_hid_close, |
454 | .start = mousevsc_hid_start, | 464 | .start = mousevsc_hid_start, |
@@ -506,13 +516,14 @@ static int mousevsc_probe(struct hv_device *device, | |||
506 | 516 | ||
507 | sprintf(hid_dev->name, "%s", "Microsoft Vmbus HID-compliant Mouse"); | 517 | sprintf(hid_dev->name, "%s", "Microsoft Vmbus HID-compliant Mouse"); |
508 | 518 | ||
519 | hid_set_drvdata(hid_dev, device); | ||
520 | |||
509 | ret = hid_add_device(hid_dev); | 521 | ret = hid_add_device(hid_dev); |
510 | if (ret) | 522 | if (ret) |
511 | goto probe_err1; | 523 | goto probe_err1; |
512 | 524 | ||
513 | ret = hid_parse_report(hid_dev, input_dev->report_desc, | ||
514 | input_dev->report_desc_size); | ||
515 | 525 | ||
526 | ret = hid_parse(hid_dev); | ||
516 | if (ret) { | 527 | if (ret) { |
517 | hid_err(hid_dev, "parse failed\n"); | 528 | hid_err(hid_dev, "parse failed\n"); |
518 | goto probe_err2; | 529 | goto probe_err2; |