HID: hyperv: Properly disconnect the input device

When we unload the mouse driver, properly disconnect the input device.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Reported-by: Fuzhou Chen <fuzhouch@microsoft.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
This commit is contained in:
K. Y. Srinivasan 2012-01-18 08:57:14 -08:00 committed by Jiri Kosina
parent ba18311dff
commit c1c454b869
1 changed files with 1 additions and 0 deletions

View File

@ -548,6 +548,7 @@ static int mousevsc_remove(struct hv_device *dev)
struct mousevsc_dev *input_dev = hv_get_drvdata(dev); struct mousevsc_dev *input_dev = hv_get_drvdata(dev);
vmbus_close(dev->channel); vmbus_close(dev->channel);
hid_hw_stop(input_dev->hid_device);
hid_destroy_device(input_dev->hid_device); hid_destroy_device(input_dev->hid_device);
mousevsc_free_device(input_dev); mousevsc_free_device(input_dev);