Commit 5ad10de6 authored by Frank Schaefer's avatar Frank Schaefer Committed by Mauro Carvalho Chehab

[media] em28xx: move v4l2_device_disconnect() call from the core to the v4l extension

Signed-off-by: default avatarFrank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: default avatarMauro Carvalho Chehab <m.chehab@samsung.com>
parent 23e8642c
......@@ -3387,16 +3387,6 @@ static void em28xx_usb_disconnect(struct usb_interface *interface)
flush_request_modules(dev);
mutex_lock(&dev->lock);
v4l2_device_disconnect(&dev->v4l2_dev);
if (dev->users)
em28xx_warn("device %s is open! Deregistration and memory deallocation are deferred on close.\n",
video_device_node_name(dev->vdev));
mutex_unlock(&dev->lock);
em28xx_close_extension(dev);
/* NOTE: must be called BEFORE the resources are released */
......
......@@ -1893,6 +1893,8 @@ static int em28xx_v4l2_fini(struct em28xx *dev)
return 0;
}
v4l2_device_disconnect(&dev->v4l2_dev);
em28xx_uninit_usb_xfer(dev, EM28XX_ANALOG_MODE);
if (dev->radio_dev) {
......@@ -1921,6 +1923,9 @@ static int em28xx_v4l2_fini(struct em28xx *dev)
dev->vdev = NULL;
}
if (dev->users)
em28xx_warn("Device is open ! Deregistration and memory deallocation are deferred on close.\n");
return 0;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment