Skip to content

Commit 70307f2

Browse files
ribaldamchehab
authored andcommitted
media: v4l2: Remove vidioc_g_ctrl callback
All the drivers either use the control framework or provide a vidioc_g_ext_ctrls callback. We can remove this callback. Thanks for your service! 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 0f6b05e commit 70307f2

3 files changed

Lines changed: 1 addition & 7 deletions

File tree

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -576,7 +576,7 @@ static void determine_valid_ioctls(struct video_device *vdev)
576576
__set_bit(_IOC_NR(VIDIOC_QUERYCTRL), valid_ioctls);
577577
if (vdev->ctrl_handler || ops->vidioc_query_ext_ctrl)
578578
__set_bit(_IOC_NR(VIDIOC_QUERY_EXT_CTRL), valid_ioctls);
579-
if (vdev->ctrl_handler || ops->vidioc_g_ctrl || ops->vidioc_g_ext_ctrls)
579+
if (vdev->ctrl_handler || ops->vidioc_g_ext_ctrls)
580580
__set_bit(_IOC_NR(VIDIOC_G_CTRL), valid_ioctls);
581581
if (vdev->ctrl_handler || ops->vidioc_s_ctrl || ops->vidioc_s_ext_ctrls)
582582
__set_bit(_IOC_NR(VIDIOC_S_CTRL), valid_ioctls);

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2380,8 +2380,6 @@ static int v4l_g_ctrl(const struct v4l2_ioctl_ops *ops,
23802380
return v4l2_g_ctrl(vfh->ctrl_handler, p);
23812381
if (vfd->ctrl_handler)
23822382
return v4l2_g_ctrl(vfd->ctrl_handler, p);
2383-
if (ops->vidioc_g_ctrl)
2384-
return ops->vidioc_g_ctrl(file, fh, p);
23852383
if (ops->vidioc_g_ext_ctrls == NULL)
23862384
return -ENOTTY;
23872385

include/media/v4l2-ioctl.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -195,8 +195,6 @@ struct v4l2_fh;
195195
* :ref:`VIDIOC_S_OUTPUT <vidioc_g_output>` ioctl
196196
* @vidioc_query_ext_ctrl: pointer to the function that implements
197197
* :ref:`VIDIOC_QUERY_EXT_CTRL <vidioc_queryctrl>` ioctl
198-
* @vidioc_g_ctrl: pointer to the function that implements
199-
* :ref:`VIDIOC_G_CTRL <vidioc_g_ctrl>` ioctl
200198
* @vidioc_s_ctrl: pointer to the function that implements
201199
* :ref:`VIDIOC_S_CTRL <vidioc_g_ctrl>` ioctl
202200
* @vidioc_g_ext_ctrls: pointer to the function that implements
@@ -461,8 +459,6 @@ struct v4l2_ioctl_ops {
461459
/* Control handling */
462460
int (*vidioc_query_ext_ctrl)(struct file *file, void *fh,
463461
struct v4l2_query_ext_ctrl *a);
464-
int (*vidioc_g_ctrl)(struct file *file, void *fh,
465-
struct v4l2_control *a);
466462
int (*vidioc_s_ctrl)(struct file *file, void *fh,
467463
struct v4l2_control *a);
468464
int (*vidioc_g_ext_ctrls)(struct file *file, void *fh,

0 commit comments

Comments
 (0)