]> git.karo-electronics.de Git - linux-beck.git/commitdiff
[media] em28xx: move usb transfer uninit on device disconnect from the core to the...
authorFrank Schaefer <fschaefer.oss@googlemail.com>
Sun, 12 Jan 2014 16:24:20 +0000 (13:24 -0300)
committerMauro Carvalho Chehab <m.chehab@samsung.com>
Tue, 14 Jan 2014 16:31:32 +0000 (14:31 -0200)
Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
drivers/media/usb/em28xx/em28xx-cards.c
drivers/media/usb/em28xx/em28xx-video.c

index 7ae6e502da668aac9b13fafa4fcf9c4d0dcdaa2d..ecf92d4cde4fd6fc201c9489fc4b40a11b904997 100644 (file)
@@ -3391,12 +3391,10 @@ static void em28xx_usb_disconnect(struct usb_interface *interface)
 
        v4l2_device_disconnect(&dev->v4l2_dev);
 
-       if (dev->users) {
+       if (dev->users)
                em28xx_warn("device %s is open! Deregistration and memory deallocation are deferred on close.\n",
                            video_device_node_name(dev->vdev));
 
-               em28xx_uninit_usb_xfer(dev, EM28XX_ANALOG_MODE);
-       }
        mutex_unlock(&dev->lock);
 
        em28xx_close_extension(dev);
index efbc877c6181611cddd7cb58008e6cd0cff66164..a5a665b410602df11d5f105c662a182e021504c8 100644 (file)
@@ -1893,6 +1893,8 @@ static int em28xx_v4l2_fini(struct em28xx *dev)
                return 0;
        }
 
+       em28xx_uninit_usb_xfer(dev, EM28XX_ANALOG_MODE);
+
        if (dev->radio_dev) {
                if (video_is_registered(dev->radio_dev))
                        video_unregister_device(dev->radio_dev);