Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
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);
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);