diff options
-rw-r--r-- | drivers/hid/hid-hyperv.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/hid/hid-hyperv.c b/drivers/hid/hid-hyperv.c index f52dbcb7133b..31fad641b744 100644 --- a/drivers/hid/hid-hyperv.c +++ b/drivers/hid/hid-hyperv.c | |||
@@ -308,6 +308,9 @@ static void mousevsc_on_receive(struct hv_device *device, | |||
308 | memcpy(input_dev->input_buf, input_report->buffer, len); | 308 | memcpy(input_dev->input_buf, input_report->buffer, len); |
309 | hid_input_report(input_dev->hid_device, HID_INPUT_REPORT, | 309 | hid_input_report(input_dev->hid_device, HID_INPUT_REPORT, |
310 | input_dev->input_buf, len, 1); | 310 | input_dev->input_buf, len, 1); |
311 | |||
312 | pm_wakeup_event(&input_dev->device->device, 0); | ||
313 | |||
311 | break; | 314 | break; |
312 | default: | 315 | default: |
313 | pr_err("unsupported hid msg type - type %d len %d", | 316 | pr_err("unsupported hid msg type - type %d len %d", |
@@ -549,6 +552,8 @@ static int mousevsc_probe(struct hv_device *device, | |||
549 | goto probe_err2; | 552 | goto probe_err2; |
550 | } | 553 | } |
551 | 554 | ||
555 | device_init_wakeup(&device->device, true); | ||
556 | |||
552 | input_dev->connected = true; | 557 | input_dev->connected = true; |
553 | input_dev->init_complete = true; | 558 | input_dev->init_complete = true; |
554 | 559 | ||
@@ -571,6 +576,7 @@ static int mousevsc_remove(struct hv_device *dev) | |||
571 | { | 576 | { |
572 | struct mousevsc_dev *input_dev = hv_get_drvdata(dev); | 577 | struct mousevsc_dev *input_dev = hv_get_drvdata(dev); |
573 | 578 | ||
579 | device_init_wakeup(&dev->device, false); | ||
574 | vmbus_close(dev->channel); | 580 | vmbus_close(dev->channel); |
575 | hid_hw_stop(input_dev->hid_device); | 581 | hid_hw_stop(input_dev->hid_device); |
576 | hid_destroy_device(input_dev->hid_device); | 582 | hid_destroy_device(input_dev->hid_device); |