summaryrefslogtreecommitdiffstats
path: root/drivers/media/v4l2-core/v4l2-fh.c
diff options
context:
space:
mode:
authorShuah Khan <shuahkh@osg.samsung.com>2016-02-11 21:41:29 -0200
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2016-02-27 08:46:55 -0300
commit77fa4e072998705883c4dc672963b4bf7483cea9 (patch)
tree6b5d93eda723017ebb2bd3129ff4d2da86ffb990 /drivers/media/v4l2-core/v4l2-fh.c
parent50512333f2d7f09fc108e062278a82d2cbc6581c (diff)
downloadtalos-obmc-linux-77fa4e072998705883c4dc672963b4bf7483cea9.tar.gz
talos-obmc-linux-77fa4e072998705883c4dc672963b4bf7483cea9.zip
[media] media: Change v4l-core to check if source is free
Change s_input, s_fmt, s_tuner, s_frequency, querystd, s_hw_freq_seek, and vb2_core_streamon interfaces that alter the tuner configuration to check if it is free, by calling v4l_enable_media_source(). If source isn't free, return -EBUSY. v4l_disable_media_source() is called from v4l2_fh_exit() to release tuner (source). vb2_core_streamon() uses v4l_vb2q_enable_media_source(). Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/v4l2-core/v4l2-fh.c')
-rw-r--r--drivers/media/v4l2-core/v4l2-fh.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/media/v4l2-core/v4l2-fh.c b/drivers/media/v4l2-core/v4l2-fh.c
index c97067a25bd2..c183f0996fa1 100644
--- a/drivers/media/v4l2-core/v4l2-fh.c
+++ b/drivers/media/v4l2-core/v4l2-fh.c
@@ -29,6 +29,7 @@
#include <media/v4l2-fh.h>
#include <media/v4l2-event.h>
#include <media/v4l2-ioctl.h>
+#include <media/v4l2-mc.h>
void v4l2_fh_init(struct v4l2_fh *fh, struct video_device *vdev)
{
@@ -92,6 +93,7 @@ void v4l2_fh_exit(struct v4l2_fh *fh)
{
if (fh->vdev == NULL)
return;
+ v4l_disable_media_source(fh->vdev);
v4l2_event_unsubscribe_all(fh);
fh->vdev = NULL;
}
OpenPOWER on IntegriCloud