Commit 02fa6282 authored by Hans Verkuil's avatar Hans Verkuil Committed by Mauro Carvalho Chehab

[media] v4l2 core: remove the obsolete dv_preset support

These ioctls are no longer used by any drivers, so remove them.

[mchehab@redhat.com: Fix merge conflict]
Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 6c2afac4
...@@ -1076,10 +1076,6 @@ long v4l2_compat_ioctl32(struct file *file, unsigned int cmd, unsigned long arg) ...@@ -1076,10 +1076,6 @@ long v4l2_compat_ioctl32(struct file *file, unsigned int cmd, unsigned long arg)
case VIDIOC_DBG_G_REGISTER: case VIDIOC_DBG_G_REGISTER:
case VIDIOC_DBG_G_CHIP_IDENT: case VIDIOC_DBG_G_CHIP_IDENT:
case VIDIOC_S_HW_FREQ_SEEK: case VIDIOC_S_HW_FREQ_SEEK:
case VIDIOC_ENUM_DV_PRESETS:
case VIDIOC_S_DV_PRESET:
case VIDIOC_G_DV_PRESET:
case VIDIOC_QUERY_DV_PRESET:
case VIDIOC_S_DV_TIMINGS: case VIDIOC_S_DV_TIMINGS:
case VIDIOC_G_DV_TIMINGS: case VIDIOC_G_DV_TIMINGS:
case VIDIOC_DQEVENT: case VIDIOC_DQEVENT:
......
...@@ -685,7 +685,6 @@ static void determine_valid_ioctls(struct video_device *vdev) ...@@ -685,7 +685,6 @@ static void determine_valid_ioctls(struct video_device *vdev)
SET_VALID_IOCTL(ops, VIDIOC_ENUMAUDIO, vidioc_enumaudio); SET_VALID_IOCTL(ops, VIDIOC_ENUMAUDIO, vidioc_enumaudio);
SET_VALID_IOCTL(ops, VIDIOC_G_AUDIO, vidioc_g_audio); SET_VALID_IOCTL(ops, VIDIOC_G_AUDIO, vidioc_g_audio);
SET_VALID_IOCTL(ops, VIDIOC_S_AUDIO, vidioc_s_audio); SET_VALID_IOCTL(ops, VIDIOC_S_AUDIO, vidioc_s_audio);
SET_VALID_IOCTL(ops, VIDIOC_QUERY_DV_PRESET, vidioc_query_dv_preset);
SET_VALID_IOCTL(ops, VIDIOC_QUERY_DV_TIMINGS, vidioc_query_dv_timings); SET_VALID_IOCTL(ops, VIDIOC_QUERY_DV_TIMINGS, vidioc_query_dv_timings);
} }
if (is_tx) { if (is_tx) {
...@@ -708,9 +707,6 @@ static void determine_valid_ioctls(struct video_device *vdev) ...@@ -708,9 +707,6 @@ static void determine_valid_ioctls(struct video_device *vdev)
(ops->vidioc_g_std || vdev->current_norm))) (ops->vidioc_g_std || vdev->current_norm)))
set_bit(_IOC_NR(VIDIOC_G_PARM), valid_ioctls); set_bit(_IOC_NR(VIDIOC_G_PARM), valid_ioctls);
SET_VALID_IOCTL(ops, VIDIOC_S_PARM, vidioc_s_parm); SET_VALID_IOCTL(ops, VIDIOC_S_PARM, vidioc_s_parm);
SET_VALID_IOCTL(ops, VIDIOC_ENUM_DV_PRESETS, vidioc_enum_dv_presets);
SET_VALID_IOCTL(ops, VIDIOC_S_DV_PRESET, vidioc_s_dv_preset);
SET_VALID_IOCTL(ops, VIDIOC_G_DV_PRESET, vidioc_g_dv_preset);
SET_VALID_IOCTL(ops, VIDIOC_S_DV_TIMINGS, vidioc_s_dv_timings); SET_VALID_IOCTL(ops, VIDIOC_S_DV_TIMINGS, vidioc_s_dv_timings);
SET_VALID_IOCTL(ops, VIDIOC_G_DV_TIMINGS, vidioc_g_dv_timings); SET_VALID_IOCTL(ops, VIDIOC_G_DV_TIMINGS, vidioc_g_dv_timings);
SET_VALID_IOCTL(ops, VIDIOC_ENUM_DV_TIMINGS, vidioc_enum_dv_timings); SET_VALID_IOCTL(ops, VIDIOC_ENUM_DV_TIMINGS, vidioc_enum_dv_timings);
......
...@@ -652,22 +652,6 @@ static void v4l_print_dbg_register(const void *arg, bool write_only) ...@@ -652,22 +652,6 @@ static void v4l_print_dbg_register(const void *arg, bool write_only)
p->reg, p->val); p->reg, p->val);
} }
static void v4l_print_dv_enum_presets(const void *arg, bool write_only)
{
const struct v4l2_dv_enum_preset *p = arg;
pr_cont("index=%u, preset=%u, name=%.*s, width=%u, height=%u\n",
p->index, p->preset,
(int)sizeof(p->name), p->name, p->width, p->height);
}
static void v4l_print_dv_preset(const void *arg, bool write_only)
{
const struct v4l2_dv_preset *p = arg;
pr_cont("preset=%u\n", p->preset);
}
static void v4l_print_dv_timings(const void *arg, bool write_only) static void v4l_print_dv_timings(const void *arg, bool write_only)
{ {
const struct v4l2_dv_timings *p = arg; const struct v4l2_dv_timings *p = arg;
...@@ -1011,17 +995,13 @@ static int v4l_enuminput(const struct v4l2_ioctl_ops *ops, ...@@ -1011,17 +995,13 @@ static int v4l_enuminput(const struct v4l2_ioctl_ops *ops,
struct v4l2_input *p = arg; struct v4l2_input *p = arg;
/* /*
* We set the flags for CAP_PRESETS, CAP_DV_TIMINGS & * We set the flags for CAP_DV_TIMINGS &
* CAP_STD here based on ioctl handler provided by the * CAP_STD here based on ioctl handler provided by the
* driver. If the driver doesn't support these * driver. If the driver doesn't support these
* for a specific input, it must override these flags. * for a specific input, it must override these flags.
*/ */
if (is_valid_ioctl(vfd, VIDIOC_S_STD)) if (is_valid_ioctl(vfd, VIDIOC_S_STD))
p->capabilities |= V4L2_IN_CAP_STD; p->capabilities |= V4L2_IN_CAP_STD;
if (is_valid_ioctl(vfd, VIDIOC_S_DV_PRESET))
p->capabilities |= V4L2_IN_CAP_PRESETS;
if (is_valid_ioctl(vfd, VIDIOC_S_DV_TIMINGS))
p->capabilities |= V4L2_IN_CAP_DV_TIMINGS;
return ops->vidioc_enum_input(file, fh, p); return ops->vidioc_enum_input(file, fh, p);
} }
...@@ -1033,17 +1013,13 @@ static int v4l_enumoutput(const struct v4l2_ioctl_ops *ops, ...@@ -1033,17 +1013,13 @@ static int v4l_enumoutput(const struct v4l2_ioctl_ops *ops,
struct v4l2_output *p = arg; struct v4l2_output *p = arg;
/* /*
* We set the flags for CAP_PRESETS, CAP_DV_TIMINGS & * We set the flags for CAP_DV_TIMINGS &
* CAP_STD here based on ioctl handler provided by the * CAP_STD here based on ioctl handler provided by the
* driver. If the driver doesn't support these * driver. If the driver doesn't support these
* for a specific output, it must override these flags. * for a specific output, it must override these flags.
*/ */
if (is_valid_ioctl(vfd, VIDIOC_S_STD)) if (is_valid_ioctl(vfd, VIDIOC_S_STD))
p->capabilities |= V4L2_OUT_CAP_STD; p->capabilities |= V4L2_OUT_CAP_STD;
if (is_valid_ioctl(vfd, VIDIOC_S_DV_PRESET))
p->capabilities |= V4L2_OUT_CAP_PRESETS;
if (is_valid_ioctl(vfd, VIDIOC_S_DV_TIMINGS))
p->capabilities |= V4L2_OUT_CAP_DV_TIMINGS;
return ops->vidioc_enum_output(file, fh, p); return ops->vidioc_enum_output(file, fh, p);
} }
...@@ -2040,10 +2016,6 @@ static struct v4l2_ioctl_info v4l2_ioctls[] = { ...@@ -2040,10 +2016,6 @@ static struct v4l2_ioctl_info v4l2_ioctls[] = {
IOCTL_INFO_FNC(VIDIOC_DBG_G_REGISTER, v4l_dbg_g_register, v4l_print_dbg_register, 0), IOCTL_INFO_FNC(VIDIOC_DBG_G_REGISTER, v4l_dbg_g_register, v4l_print_dbg_register, 0),
IOCTL_INFO_FNC(VIDIOC_DBG_G_CHIP_IDENT, v4l_dbg_g_chip_ident, v4l_print_dbg_chip_ident, 0), IOCTL_INFO_FNC(VIDIOC_DBG_G_CHIP_IDENT, v4l_dbg_g_chip_ident, v4l_print_dbg_chip_ident, 0),
IOCTL_INFO_FNC(VIDIOC_S_HW_FREQ_SEEK, v4l_s_hw_freq_seek, v4l_print_hw_freq_seek, INFO_FL_PRIO), IOCTL_INFO_FNC(VIDIOC_S_HW_FREQ_SEEK, v4l_s_hw_freq_seek, v4l_print_hw_freq_seek, INFO_FL_PRIO),
IOCTL_INFO_STD(VIDIOC_ENUM_DV_PRESETS, vidioc_enum_dv_presets, v4l_print_dv_enum_presets, 0),
IOCTL_INFO_STD(VIDIOC_S_DV_PRESET, vidioc_s_dv_preset, v4l_print_dv_preset, INFO_FL_PRIO),
IOCTL_INFO_STD(VIDIOC_G_DV_PRESET, vidioc_g_dv_preset, v4l_print_dv_preset, 0),
IOCTL_INFO_STD(VIDIOC_QUERY_DV_PRESET, vidioc_query_dv_preset, v4l_print_dv_preset, 0),
IOCTL_INFO_STD(VIDIOC_S_DV_TIMINGS, vidioc_s_dv_timings, v4l_print_dv_timings, INFO_FL_PRIO), IOCTL_INFO_STD(VIDIOC_S_DV_TIMINGS, vidioc_s_dv_timings, v4l_print_dv_timings, INFO_FL_PRIO),
IOCTL_INFO_STD(VIDIOC_G_DV_TIMINGS, vidioc_g_dv_timings, v4l_print_dv_timings, 0), IOCTL_INFO_STD(VIDIOC_G_DV_TIMINGS, vidioc_g_dv_timings, v4l_print_dv_timings, 0),
IOCTL_INFO_FNC(VIDIOC_DQEVENT, v4l_dqevent, v4l_print_event, 0), IOCTL_INFO_FNC(VIDIOC_DQEVENT, v4l_dqevent, v4l_print_event, 0),
......
...@@ -254,15 +254,6 @@ struct v4l2_ioctl_ops { ...@@ -254,15 +254,6 @@ struct v4l2_ioctl_ops {
struct v4l2_frmivalenum *fival); struct v4l2_frmivalenum *fival);
/* DV Timings IOCTLs */ /* DV Timings IOCTLs */
int (*vidioc_enum_dv_presets) (struct file *file, void *fh,
struct v4l2_dv_enum_preset *preset);
int (*vidioc_s_dv_preset) (struct file *file, void *fh,
struct v4l2_dv_preset *preset);
int (*vidioc_g_dv_preset) (struct file *file, void *fh,
struct v4l2_dv_preset *preset);
int (*vidioc_query_dv_preset) (struct file *file, void *fh,
struct v4l2_dv_preset *qpreset);
int (*vidioc_s_dv_timings) (struct file *file, void *fh, int (*vidioc_s_dv_timings) (struct file *file, void *fh,
struct v4l2_dv_timings *timings); struct v4l2_dv_timings *timings);
int (*vidioc_g_dv_timings) (struct file *file, void *fh, int (*vidioc_g_dv_timings) (struct file *file, void *fh,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment