diff options
author | Frank Schaefer <fschaefer.oss@googlemail.com> | 2014-01-12 13:24:21 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2014-01-14 14:31:40 -0200 |
commit | 5ad10de6ff29172f84fe6cdca74b16731385f1cf (patch) | |
tree | 8d09e8375f55f8b1ca09629ea76b8cce31fb2a07 /drivers/media | |
parent | 23e8642cc48171151cc89a33eb84c929dcdf2c19 (diff) | |
download | blackbird-op-linux-5ad10de6ff29172f84fe6cdca74b16731385f1cf.tar.gz blackbird-op-linux-5ad10de6ff29172f84fe6cdca74b16731385f1cf.zip |
[media] em28xx: move v4l2_device_disconnect() call from the core to the v4l extension
Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/usb/em28xx/em28xx-cards.c | 10 | ||||
-rw-r--r-- | drivers/media/usb/em28xx/em28xx-video.c | 5 |
2 files changed, 5 insertions, 10 deletions
diff --git a/drivers/media/usb/em28xx/em28xx-cards.c b/drivers/media/usb/em28xx/em28xx-cards.c index ecf92d4cde4f..2f520a540700 100644 --- a/drivers/media/usb/em28xx/em28xx-cards.c +++ b/drivers/media/usb/em28xx/em28xx-cards.c @@ -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 */ diff --git a/drivers/media/usb/em28xx/em28xx-video.c b/drivers/media/usb/em28xx/em28xx-video.c index a5a665b41060..f5f716e2c5e6 100644 --- a/drivers/media/usb/em28xx/em28xx-video.c +++ b/drivers/media/usb/em28xx/em28xx-video.c @@ -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; } |