public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: "Frank Schäfer" <fschaefer.oss@googlemail.com>
To: mchehab@redhat.com
Cc: linux-media@vger.kernel.org,
	"Frank Schäfer" <fschaefer.oss@googlemail.com>
Subject: [REVIEW PATCH 08/12] em28xx: get rid of duplicate function vidioc_s_fmt_vbi_cap()
Date: Fri, 25 Jan 2013 18:26:58 +0100	[thread overview]
Message-ID: <1359134822-4585-9-git-send-email-fschaefer.oss@googlemail.com> (raw)
In-Reply-To: <1359134822-4585-1-git-send-email-fschaefer.oss@googlemail.com>

vidioc_s_fmt_vbi_cap() is a 100% duplicate of vidioc_g_fmt_vbi_cap() and
therefore can be removed.

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
---
 drivers/media/usb/em28xx/em28xx-video.c |   31 +------------------------------
 1 Datei geändert, 1 Zeile hinzugefügt(+), 30 Zeilen entfernt(-)

diff --git a/drivers/media/usb/em28xx/em28xx-video.c b/drivers/media/usb/em28xx/em28xx-video.c
index edd29ae..af3e70a 100644
--- a/drivers/media/usb/em28xx/em28xx-video.c
+++ b/drivers/media/usb/em28xx/em28xx-video.c
@@ -1480,35 +1480,6 @@ static int vidioc_g_fmt_vbi_cap(struct file *file, void *priv,
 	return 0;
 }
 
-static int vidioc_s_fmt_vbi_cap(struct file *file, void *priv,
-				struct v4l2_format *format)
-{
-	struct em28xx_fh      *fh  = priv;
-	struct em28xx         *dev = fh->dev;
-
-	format->fmt.vbi.samples_per_line = dev->vbi_width;
-	format->fmt.vbi.sample_format = V4L2_PIX_FMT_GREY;
-	format->fmt.vbi.offset = 0;
-	format->fmt.vbi.flags = 0;
-	format->fmt.vbi.sampling_rate = 6750000 * 4 / 2;
-	format->fmt.vbi.count[0] = dev->vbi_height;
-	format->fmt.vbi.count[1] = dev->vbi_height;
-	memset(format->fmt.vbi.reserved, 0, sizeof(format->fmt.vbi.reserved));
-
-	/* Varies by video standard (NTSC, PAL, etc.) */
-	if (dev->norm & V4L2_STD_525_60) {
-		/* NTSC */
-		format->fmt.vbi.start[0] = 10;
-		format->fmt.vbi.start[1] = 273;
-	} else if (dev->norm & V4L2_STD_625_50) {
-		/* PAL */
-		format->fmt.vbi.start[0] = 6;
-		format->fmt.vbi.start[1] = 318;
-	}
-
-	return 0;
-}
-
 /* ----------------------------------------------------------- */
 /* RADIO ESPECIFIC IOCTLS                                      */
 /* ----------------------------------------------------------- */
@@ -1707,7 +1678,7 @@ static const struct v4l2_ioctl_ops video_ioctl_ops = {
 	.vidioc_s_fmt_vid_cap       = vidioc_s_fmt_vid_cap,
 	.vidioc_g_fmt_vbi_cap       = vidioc_g_fmt_vbi_cap,
 	.vidioc_try_fmt_vbi_cap     = vidioc_g_fmt_vbi_cap,
-	.vidioc_s_fmt_vbi_cap       = vidioc_s_fmt_vbi_cap,
+	.vidioc_s_fmt_vbi_cap       = vidioc_g_fmt_vbi_cap,
 	.vidioc_enum_framesizes     = vidioc_enum_framesizes,
 	.vidioc_g_audio             = vidioc_g_audio,
 	.vidioc_s_audio             = vidioc_s_audio,
-- 
1.7.10.4


  parent reply	other threads:[~2013-01-25 17:26 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-25 17:26 [REVIEW PATCH 00/12] em28xx: ioctl fixes/clean-ups Frank Schäfer
2013-01-25 17:26 ` [REVIEW PATCH 01/12] em28xx: use v4l2_disable_ioctl() to disable ioctls VIDIOC_QUERYSTD, VIDIOC_G/S_STD Frank Schäfer
2013-01-25 17:26 ` [REVIEW PATCH 02/12] em28xx: disable tuner related ioctls for video and VBI devices without tuner Frank Schäfer
2013-01-25 17:26 ` [REVIEW PATCH 03/12] em28xx: use v4l2_disable_ioctl() to disable ioctls VIDIOC_G_AUDIO and VIDIOC_S_AUDIO Frank Schäfer
2013-01-25 17:26 ` [REVIEW PATCH 04/12] em28xx: use v4l2_disable_ioctl() to disable ioctl VIDIOC_S_PARM Frank Schäfer
2013-01-25 17:26 ` [REVIEW PATCH 05/12] em28xx: disable ioctl VIDIOC_S_PARM for VBI devices Frank Schäfer
2013-01-25 17:26 ` [REVIEW PATCH 06/12] em28xx: make ioctls VIDIOC_G/S_PARM working " Frank Schäfer
2013-01-25 17:26 ` [REVIEW PATCH 07/12] em28xx: remove ioctl VIDIOC_CROPCAP Frank Schäfer
2013-01-25 17:26 ` Frank Schäfer [this message]
2013-01-25 17:26 ` [REVIEW PATCH 09/12] em28xx: VIDIOC_G_TUNER: remove unneeded setting of tuner type Frank Schäfer
2013-01-25 17:27 ` [REVIEW PATCH 10/12] em28xx: remove obsolete device state checks from the ioctl functions Frank Schäfer
2013-01-25 17:27 ` [REVIEW PATCH 11/12] em28xx: make ioctl VIDIOC_DBG_G_CHIP_IDENT available for radio devices Frank Schäfer
2013-01-28 10:00   ` Hans Verkuil
2013-01-29 17:38     ` Frank Schäfer
2013-01-25 17:27 ` [REVIEW PATCH 12/12] em28xx: do not claim VBI support if the device is a camera Frank Schäfer
2013-01-28 10:01 ` [REVIEW PATCH 00/12] em28xx: ioctl fixes/clean-ups Hans Verkuil

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1359134822-4585-9-git-send-email-fschaefer.oss@googlemail.com \
    --to=fschaefer.oss@googlemail.com \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox