HID: hyperv: Properly disconnect the input device
authorK. Y. Srinivasan <kys@microsoft.com>
Wed, 18 Jan 2012 16:57:14 +0000 (08:57 -0800)
committerJiri Kosina <jkosina@suse.cz>
Thu, 2 Feb 2012 09:56:11 +0000 (10:56 +0100)
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>
drivers/hid/hid-hyperv.c

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