From a0c3867c0800d3e587c5b2aba27e10020e148605 Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Sun, 9 May 2010 07:20:40 -0300 Subject: [PATCH] --- yaml --- r: 219039 b: refs/heads/master c: 8f56aaa3e65d675b756fac67b8abc8f2acaaf2f2 h: refs/heads/master i: 219037: 8a6a585322f021055792bba66f86ba0bc36931c7 219035: c1d7c72c227281dd6e207b68ce308cc7bf0a3e35 219031: 3332acd9089ba21a16570a149c207d37bb910dec 219023: c3589dbce897641a24c5895dead20412acfa4024 219007: 2d1ec67f16320171ef935c6dac2e63d1c33553fd v: v3 --- [refs] | 2 +- trunk/drivers/media/video/tvp514x.c | 71 ----------------------------- 2 files changed, 1 insertion(+), 72 deletions(-) diff --git a/[refs] b/[refs] index 491c31e13fa1..8ddc0fccfa0d 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: d3ca77595f4b1f17a6d41a89f942fea2b3b17d0c +refs/heads/master: 8f56aaa3e65d675b756fac67b8abc8f2acaaf2f2 diff --git a/trunk/drivers/media/video/tvp514x.c b/trunk/drivers/media/video/tvp514x.c index c0308c16e21f..45bcf0358a1d 100644 --- a/trunk/drivers/media/video/tvp514x.c +++ b/trunk/drivers/media/video/tvp514x.c @@ -948,31 +948,6 @@ tvp514x_enum_mbus_fmt(struct v4l2_subdev *sd, unsigned index, return 0; } -/** - * tvp514x_enum_fmt_cap() - V4L2 decoder interface handler for enum_fmt - * @sd: pointer to standard V4L2 sub-device structure - * @fmt: standard V4L2 VIDIOC_ENUM_FMT ioctl structure - * - * Implement the VIDIOC_ENUM_FMT ioctl to enumerate supported formats - */ -static int -tvp514x_enum_fmt_cap(struct v4l2_subdev *sd, struct v4l2_fmtdesc *fmt) -{ - if (fmt == NULL || fmt->index) - return -EINVAL; - - if (fmt->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) - /* only capture is supported */ - return -EINVAL; - - /* only one format */ - fmt->flags = 0; - strlcpy(fmt->description, "8-bit UYVY 4:2:2 Format", - sizeof(fmt->description)); - fmt->pixelformat = V4L2_PIX_FMT_UYVY; - return 0; -} - /** * tvp514x_mbus_fmt_cap() - V4L2 decoder interface handler for try/s/g_mbus_fmt * @sd: pointer to standard V4L2 sub-device structure @@ -1003,48 +978,6 @@ tvp514x_mbus_fmt(struct v4l2_subdev *sd, struct v4l2_mbus_framefmt *f) return 0; } -/** - * tvp514x_fmt_cap() - V4L2 decoder interface handler for try/s/g_fmt - * @sd: pointer to standard V4L2 sub-device structure - * @f: pointer to standard V4L2 VIDIOC_TRY_FMT ioctl structure - * - * Implement the VIDIOC_TRY/S/G_FMT ioctl for the CAPTURE buffer type. This - * ioctl is used to negotiate the image capture size and pixel format. - */ -static int -tvp514x_fmt_cap(struct v4l2_subdev *sd, struct v4l2_format *f) -{ - struct tvp514x_decoder *decoder = to_decoder(sd); - struct v4l2_pix_format *pix; - enum tvp514x_std current_std; - - if (f == NULL) - return -EINVAL; - - if (f->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) - return -EINVAL; - - pix = &f->fmt.pix; - - /* Calculate height and width based on current standard */ - current_std = decoder->current_std; - - pix->pixelformat = V4L2_PIX_FMT_UYVY; - pix->width = decoder->std_list[current_std].width; - pix->height = decoder->std_list[current_std].height; - pix->field = V4L2_FIELD_INTERLACED; - pix->bytesperline = pix->width * 2; - pix->sizeimage = pix->bytesperline * pix->height; - pix->colorspace = V4L2_COLORSPACE_SMPTE170M; - pix->priv = 0; - - v4l2_dbg(1, debug, sd, "FMT: bytesperline - %d" - "Width - %d, Height - %d\n", - pix->bytesperline, - pix->width, pix->height); - return 0; -} - /** * tvp514x_g_parm() - V4L2 decoder interface handler for g_parm * @sd: pointer to standard V4L2 sub-device structure @@ -1181,10 +1114,6 @@ static const struct v4l2_subdev_core_ops tvp514x_core_ops = { static const struct v4l2_subdev_video_ops tvp514x_video_ops = { .s_routing = tvp514x_s_routing, .querystd = tvp514x_querystd, - .enum_fmt = tvp514x_enum_fmt_cap, - .g_fmt = tvp514x_fmt_cap, - .try_fmt = tvp514x_fmt_cap, - .s_fmt = tvp514x_fmt_cap, .enum_mbus_fmt = tvp514x_enum_mbus_fmt, .g_mbus_fmt = tvp514x_mbus_fmt, .try_mbus_fmt = tvp514x_mbus_fmt,