Skip to content

Commit

Permalink
[media] go7007: remove cropping functions
Browse files Browse the repository at this point in the history
Remove these dummy cropping functions: cropping was never implemented.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Hans Verkuil authored and Mauro Carvalho Chehab committed Mar 24, 2013
1 parent 6bb0e65 commit 793d7b7
Showing 1 changed file with 0 additions and 92 deletions.
92 changes: 0 additions & 92 deletions drivers/staging/media/go7007/go7007-v4l2.c
Original file line number Diff line number Diff line change
Expand Up @@ -842,95 +842,6 @@ static int vidioc_log_status(struct file *file, void *priv)
return call_all(&go->v4l2_dev, core, log_status);
}

static int vidioc_cropcap(struct file *file, void *priv,
struct v4l2_cropcap *cropcap)
{
struct go7007 *go = video_drvdata(file);

if (cropcap->type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
return -EINVAL;

/* These specify the raw input of the sensor */
switch (go->standard) {
case GO7007_STD_NTSC:
cropcap->bounds.top = 0;
cropcap->bounds.left = 0;
cropcap->bounds.width = 720;
cropcap->bounds.height = 480;
cropcap->defrect.top = 0;
cropcap->defrect.left = 0;
cropcap->defrect.width = 720;
cropcap->defrect.height = 480;
break;
case GO7007_STD_PAL:
cropcap->bounds.top = 0;
cropcap->bounds.left = 0;
cropcap->bounds.width = 720;
cropcap->bounds.height = 576;
cropcap->defrect.top = 0;
cropcap->defrect.left = 0;
cropcap->defrect.width = 720;
cropcap->defrect.height = 576;
break;
case GO7007_STD_OTHER:
cropcap->bounds.top = 0;
cropcap->bounds.left = 0;
cropcap->bounds.width = go->board_info->sensor_width;
cropcap->bounds.height = go->board_info->sensor_height;
cropcap->defrect.top = 0;
cropcap->defrect.left = 0;
cropcap->defrect.width = go->board_info->sensor_width;
cropcap->defrect.height = go->board_info->sensor_height;
break;
}

return 0;
}

static int vidioc_g_crop(struct file *file, void *priv, struct v4l2_crop *crop)
{
struct go7007 *go = video_drvdata(file);

if (crop->type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
return -EINVAL;

crop->type = V4L2_BUF_TYPE_VIDEO_CAPTURE;

/* These specify the raw input of the sensor */
switch (go->standard) {
case GO7007_STD_NTSC:
crop->c.top = 0;
crop->c.left = 0;
crop->c.width = 720;
crop->c.height = 480;
break;
case GO7007_STD_PAL:
crop->c.top = 0;
crop->c.left = 0;
crop->c.width = 720;
crop->c.height = 576;
break;
case GO7007_STD_OTHER:
crop->c.top = 0;
crop->c.left = 0;
crop->c.width = go->board_info->sensor_width;
crop->c.height = go->board_info->sensor_height;
break;
}

return 0;
}

/* FIXME: vidioc_s_crop is not really implemented!!!
*/
static int vidioc_s_crop(struct file *file, void *priv, const struct v4l2_crop *crop)
{
if (crop->type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
return -EINVAL;

return 0;
}

/* FIXME:
Those ioctls are private, and not needed, since several standard
extended controls already provide streaming control.
Expand Down Expand Up @@ -1006,9 +917,6 @@ static const struct v4l2_ioctl_ops video_ioctl_ops = {
.vidioc_s_parm = vidioc_s_parm,
.vidioc_enum_framesizes = vidioc_enum_framesizes,
.vidioc_enum_frameintervals = vidioc_enum_frameintervals,
.vidioc_cropcap = vidioc_cropcap,
.vidioc_g_crop = vidioc_g_crop,
.vidioc_s_crop = vidioc_s_crop,
.vidioc_log_status = vidioc_log_status,
.vidioc_subscribe_event = v4l2_ctrl_subscribe_event,
.vidioc_unsubscribe_event = v4l2_event_unsubscribe,
Expand Down

0 comments on commit 793d7b7

Please sign in to comment.