[media] media: Change v4l-core to check if source is free
authorShuah Khan <shuahkh@osg.samsung.com>
Thu, 11 Feb 2016 23:41:29 +0000 (21:41 -0200)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Sat, 27 Feb 2016 11:46:55 +0000 (08:46 -0300)
commit77fa4e072998705883c4dc672963b4bf7483cea9
tree6b5d93eda723017ebb2bd3129ff4d2da86ffb990
parent50512333f2d7f09fc108e062278a82d2cbc6581c
[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>
drivers/media/v4l2-core/v4l2-fh.c
drivers/media/v4l2-core/v4l2-ioctl.c
drivers/media/v4l2-core/videobuf2-core.c