media: v4l2-ioctl: remove unused vidioc_g/s_crop
authorHans Verkuil <hans.verkuil@cisco.com>
Thu, 4 Oct 2018 20:48:12 +0000 (16:48 -0400)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Tue, 20 Nov 2018 18:54:23 +0000 (13:54 -0500)
Now that all drivers have dropped vidioc_g/s_crop we can remove
support for them in the V4L2 core.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Tested-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
drivers/media/v4l2-core/v4l2-dev.c
drivers/media/v4l2-core/v4l2-ioctl.c
include/media/v4l2-ioctl.h

index feb749aaaa42f4c801febc1c1db158dce66f09d4..52700f4f797e9f12978ab8e85f9b05c3fda8edf6 100644 (file)
@@ -635,9 +635,9 @@ static void determine_valid_ioctls(struct video_device *vdev)
                SET_VALID_IOCTL(ops, VIDIOC_TRY_DECODER_CMD, vidioc_try_decoder_cmd);
                SET_VALID_IOCTL(ops, VIDIOC_ENUM_FRAMESIZES, vidioc_enum_framesizes);
                SET_VALID_IOCTL(ops, VIDIOC_ENUM_FRAMEINTERVALS, vidioc_enum_frameintervals);
-               if (ops->vidioc_g_crop || ops->vidioc_g_selection)
+               if (ops->vidioc_g_selection)
                        set_bit(_IOC_NR(VIDIOC_G_CROP), valid_ioctls);
-               if (ops->vidioc_s_crop || ops->vidioc_s_selection)
+               if (ops->vidioc_s_selection)
                        set_bit(_IOC_NR(VIDIOC_S_CROP), valid_ioctls);
                SET_VALID_IOCTL(ops, VIDIOC_G_SELECTION, vidioc_g_selection);
                SET_VALID_IOCTL(ops, VIDIOC_S_SELECTION, vidioc_s_selection);
index 47f4e1d767e43638b893fb50aa144006034530e7..0743d11a96467327c6c2e17af60c212233f69c9a 100644 (file)
@@ -2209,8 +2209,6 @@ static int v4l_g_crop(const struct v4l2_ioctl_ops *ops,
        };
        int ret;
 
-       if (ops->vidioc_g_crop)
-               return ops->vidioc_g_crop(file, fh, p);
        /* simulate capture crop using selection api */
 
        /* crop means compose for output devices */
@@ -2241,8 +2239,6 @@ static int v4l_s_crop(const struct v4l2_ioctl_ops *ops,
                .r = p->c,
        };
 
-       if (ops->vidioc_s_crop)
-               return ops->vidioc_s_crop(file, fh, p);
        /* simulate capture crop using selection api */
 
        /* crop means compose for output devices */
index 5848d92c30da3ddd4ee24f806eaa10315603b2e5..85fdd3f4b8ad51bafda15db8c0cbe09ce9076bd0 100644 (file)
@@ -222,10 +222,6 @@ struct v4l2_fh;
  *     :ref:`VIDIOC_S_MODULATOR <vidioc_g_modulator>` ioctl
  * @vidioc_cropcap: pointer to the function that implements
  *     :ref:`VIDIOC_CROPCAP <vidioc_cropcap>` ioctl
- * @vidioc_g_crop: pointer to the function that implements
- *     :ref:`VIDIOC_G_CROP <vidioc_g_crop>` ioctl
- * @vidioc_s_crop: pointer to the function that implements
- *     :ref:`VIDIOC_S_CROP <vidioc_g_crop>` ioctl
  * @vidioc_g_selection: pointer to the function that implements
  *     :ref:`VIDIOC_G_SELECTION <vidioc_g_selection>` ioctl
  * @vidioc_s_selection: pointer to the function that implements
@@ -493,10 +489,6 @@ struct v4l2_ioctl_ops {
        /* Crop ioctls */
        int (*vidioc_cropcap)(struct file *file, void *fh,
                              struct v4l2_cropcap *a);
-       int (*vidioc_g_crop)(struct file *file, void *fh,
-                            struct v4l2_crop *a);
-       int (*vidioc_s_crop)(struct file *file, void *fh,
-                            const struct v4l2_crop *a);
        int (*vidioc_g_selection)(struct file *file, void *fh,
                                  struct v4l2_selection *s);
        int (*vidioc_s_selection)(struct file *file, void *fh,