[media] v4l: omap4iss: Remove video node crop support
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Sun, 12 Apr 2015 12:09:05 +0000 (09:09 -0300)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Mon, 6 Jul 2015 11:25:51 +0000 (08:25 -0300)
Cropping should be configured on the pipeline subdev nodes, not through
the video nodes. Remove crop support on all video nodes.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
drivers/staging/media/omap4iss/iss_video.c

index 85c54fedddda27eb53c81d4023720bd8510e7dbf..40405d8710a65cf9ca61148970a1f1afebbe2f62 100644 (file)
@@ -639,76 +639,6 @@ iss_video_try_format(struct file *file, void *fh, struct v4l2_format *format)
        return 0;
 }
 
-static int
-iss_video_cropcap(struct file *file, void *fh, struct v4l2_cropcap *cropcap)
-{
-       struct iss_video *video = video_drvdata(file);
-       struct v4l2_subdev *subdev;
-       int ret;
-
-       subdev = iss_video_remote_subdev(video, NULL);
-       if (subdev == NULL)
-               return -EINVAL;
-
-       mutex_lock(&video->mutex);
-       ret = v4l2_subdev_call(subdev, video, cropcap, cropcap);
-       mutex_unlock(&video->mutex);
-
-       return ret == -ENOIOCTLCMD ? -ENOTTY : ret;
-}
-
-static int
-iss_video_get_crop(struct file *file, void *fh, struct v4l2_crop *crop)
-{
-       struct iss_video *video = video_drvdata(file);
-       struct v4l2_subdev_format format;
-       struct v4l2_subdev *subdev;
-       u32 pad;
-       int ret;
-
-       subdev = iss_video_remote_subdev(video, &pad);
-       if (subdev == NULL)
-               return -EINVAL;
-
-       /* Try the get crop operation first and fallback to get format if not
-        * implemented.
-        */
-       ret = v4l2_subdev_call(subdev, video, g_crop, crop);
-       if (ret != -ENOIOCTLCMD)
-               return ret;
-
-       format.pad = pad;
-       format.which = V4L2_SUBDEV_FORMAT_ACTIVE;
-       ret = v4l2_subdev_call(subdev, pad, get_fmt, NULL, &format);
-       if (ret < 0)
-               return ret == -ENOIOCTLCMD ? -ENOTTY : ret;
-
-       crop->c.left = 0;
-       crop->c.top = 0;
-       crop->c.width = format.format.width;
-       crop->c.height = format.format.height;
-
-       return 0;
-}
-
-static int
-iss_video_set_crop(struct file *file, void *fh, const struct v4l2_crop *crop)
-{
-       struct iss_video *video = video_drvdata(file);
-       struct v4l2_subdev *subdev;
-       int ret;
-
-       subdev = iss_video_remote_subdev(video, NULL);
-       if (subdev == NULL)
-               return -EINVAL;
-
-       mutex_lock(&video->mutex);
-       ret = v4l2_subdev_call(subdev, video, s_crop, crop);
-       mutex_unlock(&video->mutex);
-
-       return ret == -ENOIOCTLCMD ? -ENOTTY : ret;
-}
-
 static int
 iss_video_get_param(struct file *file, void *fh, struct v4l2_streamparm *a)
 {
@@ -1018,9 +948,6 @@ static const struct v4l2_ioctl_ops iss_video_ioctl_ops = {
        .vidioc_g_fmt_vid_out           = iss_video_get_format,
        .vidioc_s_fmt_vid_out           = iss_video_set_format,
        .vidioc_try_fmt_vid_out         = iss_video_try_format,
-       .vidioc_cropcap                 = iss_video_cropcap,
-       .vidioc_g_crop                  = iss_video_get_crop,
-       .vidioc_s_crop                  = iss_video_set_crop,
        .vidioc_g_parm                  = iss_video_get_param,
        .vidioc_s_parm                  = iss_video_set_param,
        .vidioc_reqbufs                 = iss_video_reqbufs,