mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-07 21:53:44 +00:00
media: v4l2-dev: disable frequency and tuner ioctls for touch
Touch devices have obviously no tuner, so don't attempt to enable those ioctls for such devices. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
This commit is contained in:
parent
4fbd54bbd2
commit
8669d8474a
@ -581,8 +581,10 @@ static void determine_valid_ioctls(struct video_device *vdev)
|
||||
set_bit(_IOC_NR(VIDIOC_TRY_EXT_CTRLS), valid_ioctls);
|
||||
if (vdev->ctrl_handler || ops->vidioc_querymenu)
|
||||
set_bit(_IOC_NR(VIDIOC_QUERYMENU), valid_ioctls);
|
||||
SET_VALID_IOCTL(ops, VIDIOC_G_FREQUENCY, vidioc_g_frequency);
|
||||
SET_VALID_IOCTL(ops, VIDIOC_S_FREQUENCY, vidioc_s_frequency);
|
||||
if (!is_tch) {
|
||||
SET_VALID_IOCTL(ops, VIDIOC_G_FREQUENCY, vidioc_g_frequency);
|
||||
SET_VALID_IOCTL(ops, VIDIOC_S_FREQUENCY, vidioc_s_frequency);
|
||||
}
|
||||
SET_VALID_IOCTL(ops, VIDIOC_LOG_STATUS, vidioc_log_status);
|
||||
#ifdef CONFIG_VIDEO_ADV_DEBUG
|
||||
set_bit(_IOC_NR(VIDIOC_DBG_G_CHIP_INFO), valid_ioctls);
|
||||
@ -754,7 +756,7 @@ static void determine_valid_ioctls(struct video_device *vdev)
|
||||
SET_VALID_IOCTL(ops, VIDIOC_G_MODULATOR, vidioc_g_modulator);
|
||||
SET_VALID_IOCTL(ops, VIDIOC_S_MODULATOR, vidioc_s_modulator);
|
||||
}
|
||||
if (is_rx) {
|
||||
if (is_rx && !is_tch) {
|
||||
/* receiver only ioctls */
|
||||
SET_VALID_IOCTL(ops, VIDIOC_G_TUNER, vidioc_g_tuner);
|
||||
SET_VALID_IOCTL(ops, VIDIOC_S_TUNER, vidioc_s_tuner);
|
||||
|
Loading…
Reference in New Issue
Block a user