Skip to content

Commit 0d75129

Browse files
ribaldamchehab
authored andcommitted
media: v4l2: Remove vidioc_s_ctrl callback
All the drivers either use the control framework or provide a vidiod_ext_ctrl. We can remove this callback. 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 e65d147 commit 0d75129

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
@@ -578,7 +578,7 @@ static void determine_valid_ioctls(struct video_device *vdev)
578578
__set_bit(_IOC_NR(VIDIOC_QUERY_EXT_CTRL), valid_ioctls);
579579
if (vdev->ctrl_handler || ops->vidioc_g_ext_ctrls)
580580
__set_bit(_IOC_NR(VIDIOC_G_CTRL), valid_ioctls);
581-
if (vdev->ctrl_handler || ops->vidioc_s_ctrl || ops->vidioc_s_ext_ctrls)
581+
if (vdev->ctrl_handler || ops->vidioc_s_ext_ctrls)
582582
__set_bit(_IOC_NR(VIDIOC_S_CTRL), valid_ioctls);
583583
if (vdev->ctrl_handler || ops->vidioc_g_ext_ctrls)
584584
__set_bit(_IOC_NR(VIDIOC_G_EXT_CTRLS), valid_ioctls);

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2413,8 +2413,6 @@ static int v4l_s_ctrl(const struct v4l2_ioctl_ops *ops,
24132413
return v4l2_s_ctrl(vfh, vfh->ctrl_handler, p);
24142414
if (vfd->ctrl_handler)
24152415
return v4l2_s_ctrl(NULL, vfd->ctrl_handler, p);
2416-
if (ops->vidioc_s_ctrl)
2417-
return ops->vidioc_s_ctrl(file, fh, p);
24182416
if (ops->vidioc_s_ext_ctrls == NULL)
24192417
return -ENOTTY;
24202418

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_s_ctrl: pointer to the function that implements
199-
* :ref:`VIDIOC_S_CTRL <vidioc_g_ctrl>` ioctl
200198
* @vidioc_g_ext_ctrls: pointer to the function that implements
201199
* :ref:`VIDIOC_G_EXT_CTRLS <vidioc_g_ext_ctrls>` ioctl
202200
* @vidioc_s_ext_ctrls: pointer to the function that implements
@@ -459,8 +457,6 @@ struct v4l2_ioctl_ops {
459457
/* Control handling */
460458
int (*vidioc_query_ext_ctrl)(struct file *file, void *fh,
461459
struct v4l2_query_ext_ctrl *a);
462-
int (*vidioc_s_ctrl)(struct file *file, void *fh,
463-
struct v4l2_control *a);
464460
int (*vidioc_g_ext_ctrls)(struct file *file, void *fh,
465461
struct v4l2_ext_controls *a);
466462
int (*vidioc_s_ext_ctrls)(struct file *file, void *fh,

0 commit comments

Comments
 (0)