Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux...
authorJiri Kosina <jkosina@suse.cz>
Mon, 6 Feb 2012 15:11:09 +0000 (16:11 +0100)
committerJiri Kosina <jkosina@suse.cz>
Mon, 6 Feb 2012 15:12:16 +0000 (16:12 +0100)
Sync with Linus' tree. This is necessary to have a base for
patch that fixes commit 35b4c01e29b ("power_supply: add "powers"
links to self-powered HID devices") which went in through Anton's
tree.

drivers/hid/hid-hyperv.c
drivers/hid/usbhid/hiddev.c

index 0c33ae9cf0f0e27549f3fd505e242dbb98b18be2..406632472c1bb038cdf06dae37c7f115f479e94a 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);
 
index 7c297d305d5dd42f7399eadb33e624fd9a6a0a69..b1ec0e2aeb57b0b26a66e17b067192cfc30689c1 100644 (file)
@@ -922,11 +922,11 @@ void hiddev_disconnect(struct hid_device *hid)
        struct hiddev *hiddev = hid->hiddev;
        struct usbhid_device *usbhid = hid->driver_data;
 
+       usb_deregister_dev(usbhid->intf, &hiddev_class);
+
        mutex_lock(&hiddev->existancelock);
        hiddev->exist = 0;
 
-       usb_deregister_dev(usbhid->intf, &hiddev_class);
-
        if (hiddev->open) {
                mutex_unlock(&hiddev->existancelock);
                usbhid_close(hiddev->hid);