Skip to contentSkip to conversation

drivers: hid: hid-hyperv: Properly disconnect the input device

PATCH Applied K. Y. Srinivasan 2 participants 2 messages Jan 18, 2012 – Feb 2, 2012

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drivers: hid: hid-hyperv: Properly disconnect the input device

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

---
 drivers/hid/hid-hyperv.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/hid/hid-hyperv.c +1 -0
index 0c33ae9..4066324 100644
@@ -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);
 
Signature · 1 line
1.7.4.1
Applied
#1 lore raw
Quoted 15 lines · K. Y. Srinivasan

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

---
 drivers/hid/hid-hyperv.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/hid/hid-hyperv.c +0 -0
index 0c33ae9..4066324 100644

drivers/hid/hid-hyperv.c static int mousevsc_remove(struct hv_device *dev) · line 553

Quoted 6 lines
drivers/hid/hid-hyperv.c +1 -0
@@ -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);

Applied, thanks.

Signature · 2 lines
Jiri Kosina
SUSE Labs