From 77fa4e072998705883c4dc672963b4bf7483cea9 Mon Sep 17 00:00:00 2001 From: Shuah Khan Date: Thu, 11 Feb 2016 21:41:29 -0200 Subject: [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 Signed-off-by: Mauro Carvalho Chehab --- drivers/media/v4l2-core/v4l2-fh.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'drivers/media/v4l2-core/v4l2-fh.c') 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 #include #include +#include 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; } -- cgit v1.2.3-59-g8ed1b