aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrank Schaefer <fschaefer.oss@googlemail.com>2014-01-12 11:24:21 -0500
committerMauro Carvalho Chehab <m.chehab@samsung.com>2014-01-14 11:31:40 -0500
commit5ad10de6ff29172f84fe6cdca74b16731385f1cf (patch)
tree8d09e8375f55f8b1ca09629ea76b8cce31fb2a07
parent23e8642cc48171151cc89a33eb84c929dcdf2c19 (diff)
[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>
-rw-r--r--drivers/media/usb/em28xx/em28xx-cards.c10
-rw-r--r--drivers/media/usb/em28xx/em28xx-video.c5
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)
3387 3387
3388 flush_request_modules(dev); 3388 flush_request_modules(dev);
3389 3389
3390 mutex_lock(&dev->lock);
3391
3392 v4l2_device_disconnect(&dev->v4l2_dev);
3393
3394 if (dev->users)
3395 em28xx_warn("device %s is open! Deregistration and memory deallocation are deferred on close.\n",
3396 video_device_node_name(dev->vdev));
3397
3398 mutex_unlock(&dev->lock);
3399
3400 em28xx_close_extension(dev); 3390 em28xx_close_extension(dev);
3401 3391
3402 /* NOTE: must be called BEFORE the resources are released */ 3392 /* 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)
1893 return 0; 1893 return 0;
1894 } 1894 }
1895 1895
1896 v4l2_device_disconnect(&dev->v4l2_dev);
1897
1896 em28xx_uninit_usb_xfer(dev, EM28XX_ANALOG_MODE); 1898 em28xx_uninit_usb_xfer(dev, EM28XX_ANALOG_MODE);
1897 1899
1898 if (dev->radio_dev) { 1900 if (dev->radio_dev) {
@@ -1921,6 +1923,9 @@ static int em28xx_v4l2_fini(struct em28xx *dev)
1921 dev->vdev = NULL; 1923 dev->vdev = NULL;
1922 } 1924 }
1923 1925
1926 if (dev->users)
1927 em28xx_warn("Device is open ! Deregistration and memory deallocation are deferred on close.\n");
1928
1924 return 0; 1929 return 0;
1925} 1930}
1926 1931