Skip to content

Commit 0f6b05e

Browse files
ribaldamchehab
authored andcommitted
media: v4l2: Remove vidioc_queryctrl callback
All the drivers either use the control framework or provide a vidioc_query_ext_ctrl. We can remove this callback to reduce the temptation of new drivers to implement it. Signed-off-by: Ricardo Ribalda <ribalda@chromium.org> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
1 parent d8d867c commit 0f6b05e

3 files changed

Lines changed: 1 addition & 8 deletions

File tree

drivers/media/v4l2-core/v4l2-dev.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -572,8 +572,7 @@ static void determine_valid_ioctls(struct video_device *vdev)
572572
and that can't be tested here. If the bit for these control ioctls
573573
is set, then the ioctl is valid. But if it is 0, then it can still
574574
be valid if the filehandle passed the control handler. */
575-
if (vdev->ctrl_handler || ops->vidioc_queryctrl ||
576-
ops->vidioc_query_ext_ctrl)
575+
if (vdev->ctrl_handler || ops->vidioc_query_ext_ctrl)
577576
__set_bit(_IOC_NR(VIDIOC_QUERYCTRL), valid_ioctls);
578577
if (vdev->ctrl_handler || ops->vidioc_query_ext_ctrl)
579578
__set_bit(_IOC_NR(VIDIOC_QUERY_EXT_CTRL), valid_ioctls);

drivers/media/v4l2-core/v4l2-ioctl.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2296,8 +2296,6 @@ static int v4l_queryctrl(const struct v4l2_ioctl_ops *ops,
22962296
return v4l2_queryctrl(vfh->ctrl_handler, p);
22972297
if (vfd->ctrl_handler)
22982298
return v4l2_queryctrl(vfd->ctrl_handler, p);
2299-
if (ops->vidioc_queryctrl)
2300-
return ops->vidioc_queryctrl(file, fh, p);
23012299
if (!ops->vidioc_query_ext_ctrl)
23022300
return -ENOTTY;
23032301

include/media/v4l2-ioctl.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -193,8 +193,6 @@ struct v4l2_fh;
193193
* :ref:`VIDIOC_G_OUTPUT <vidioc_g_output>` ioctl
194194
* @vidioc_s_output: pointer to the function that implements
195195
* :ref:`VIDIOC_S_OUTPUT <vidioc_g_output>` ioctl
196-
* @vidioc_queryctrl: pointer to the function that implements
197-
* :ref:`VIDIOC_QUERYCTRL <vidioc_queryctrl>` ioctl
198196
* @vidioc_query_ext_ctrl: pointer to the function that implements
199197
* :ref:`VIDIOC_QUERY_EXT_CTRL <vidioc_queryctrl>` ioctl
200198
* @vidioc_g_ctrl: pointer to the function that implements
@@ -461,8 +459,6 @@ struct v4l2_ioctl_ops {
461459
int (*vidioc_s_output)(struct file *file, void *fh, unsigned int i);
462460

463461
/* Control handling */
464-
int (*vidioc_queryctrl)(struct file *file, void *fh,
465-
struct v4l2_queryctrl *a);
466462
int (*vidioc_query_ext_ctrl)(struct file *file, void *fh,
467463
struct v4l2_query_ext_ctrl *a);
468464
int (*vidioc_g_ctrl)(struct file *file, void *fh,

0 commit comments

Comments
 (0)