[media] v4l2 core: remove the obsolete dv_preset support
authorHans Verkuil <hans.verkuil@cisco.com>
Fri, 15 Feb 2013 18:21:06 +0000 (15:21 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Sun, 24 Mar 2013 16:49:17 +0000 (13:49 -0300)
These ioctls are no longer used by any drivers, so remove them.

[mchehab@redhat.com: Fix merge conflict]
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/v4l2-core/v4l2-compat-ioctl32.c
drivers/media/v4l2-core/v4l2-dev.c
drivers/media/v4l2-core/v4l2-ioctl.c
include/media/v4l2-ioctl.h

index 7157af301b14946b6b7c3ecbd0933fe80e472f35..f1295519f2853315d14095075ccb5e479653c14a 100644 (file)
@@ -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_CHIP_IDENT:
        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_G_DV_TIMINGS:
        case VIDIOC_DQEVENT:
index de1e9ab7db9910169a1f94ee5f4617336a54e6eb..1fbd95755e757fdd339ad5499f0d394e940bcdd9 100644 (file)
@@ -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_G_AUDIO, vidioc_g_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);
                }
                if (is_tx) {
@@ -708,9 +707,6 @@ static void determine_valid_ioctls(struct video_device *vdev)
                                        (ops->vidioc_g_std || vdev->current_norm)))
                        set_bit(_IOC_NR(VIDIOC_G_PARM), valid_ioctls);
                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_G_DV_TIMINGS, vidioc_g_dv_timings);
                SET_VALID_IOCTL(ops, VIDIOC_ENUM_DV_TIMINGS, vidioc_enum_dv_timings);
index 72c22fde2b69379d2efde340f41721a67edff37f..83aa39dfe07c81c6aaac2b52b3a65bf14e8553a4 100644 (file)
@@ -652,22 +652,6 @@ static void v4l_print_dbg_register(const void *arg, bool write_only)
                        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)
 {
        const struct v4l2_dv_timings *p = arg;
@@ -1011,17 +995,13 @@ static int v4l_enuminput(const struct v4l2_ioctl_ops *ops,
        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
         * driver. If the driver doesn't support these
         * for a specific input, it must override these flags.
         */
        if (is_valid_ioctl(vfd, VIDIOC_S_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);
 }
@@ -1033,17 +1013,13 @@ static int v4l_enumoutput(const struct v4l2_ioctl_ops *ops,
        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
         * driver. If the driver doesn't support these
         * for a specific output, it must override these flags.
         */
        if (is_valid_ioctl(vfd, VIDIOC_S_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);
 }
@@ -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_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_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_G_DV_TIMINGS, vidioc_g_dv_timings, v4l_print_dv_timings, 0),
        IOCTL_INFO_FNC(VIDIOC_DQEVENT, v4l_dqevent, v4l_print_event, 0),
index a4175cda4fc1bba0edf34d90651c01b21945b84a..e10c2432f902aa831b55215fcca11845adac2937 100644 (file)
@@ -254,15 +254,6 @@ struct v4l2_ioctl_ops {
                                           struct v4l2_frmivalenum *fival);
 
        /* 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,
                                    struct v4l2_dv_timings *timings);
        int (*vidioc_g_dv_timings) (struct file *file, void *fh,