aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/bt8xx/bttv-driver.c
diff options
context:
space:
mode:
authorTrent Piepho <xyzzy@speakeasy.org>2009-03-03 23:21:02 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-03-30 11:43:05 -0400
commit51f0b8d57af501624ee55e8ca15d09d5bdc2b0dd (patch)
tree095d574cc559f813ca7d2da2642b7431b661f4bb /drivers/media/video/bt8xx/bttv-driver.c
parent337f9d205972bfe1cb7982384fd0f4caa4af001d (diff)
V4L/DVB (10813): v4l2: New function v4l2_video_std_frame_period
Some code was calling v4l2_video_std_construct() when all it cared about was the frame period. So make a function that just returns that and have v4l2_video_std_construct() use it. At this point there are no users of v4l2_video_std_construct() left outside of v4l2-ioctl, so it could be un-exported and made static. Change v4l2_video_std_construct() so that it doesn't zero out the struct v4l2_standard passed in. It's already been zeroed out in the common ioctl code. Signed-off-by: Trent Piepho <xyzzy@speakeasy.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/bt8xx/bttv-driver.c')
-rw-r--r--drivers/media/video/bt8xx/bttv-driver.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/media/video/bt8xx/bttv-driver.c b/drivers/media/video/bt8xx/bttv-driver.c
index 826ca60b42e6..1f606d816a58 100644
--- a/drivers/media/video/bt8xx/bttv-driver.c
+++ b/drivers/media/video/bt8xx/bttv-driver.c
@@ -2932,13 +2932,11 @@ static int bttv_g_parm(struct file *file, void *f,
2932{ 2932{
2933 struct bttv_fh *fh = f; 2933 struct bttv_fh *fh = f;
2934 struct bttv *btv = fh->btv; 2934 struct bttv *btv = fh->btv;
2935 struct v4l2_standard s;
2936 2935
2937 if (parm->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) 2936 if (parm->type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
2938 return -EINVAL; 2937 return -EINVAL;
2939 v4l2_video_std_construct(&s, bttv_tvnorms[btv->tvnorm].v4l2_id, 2938 v4l2_video_std_frame_period(bttv_tvnorms[btv->tvnorm].v4l2_id,
2940 bttv_tvnorms[btv->tvnorm].name); 2939 &parm->parm.capture.timeperframe);
2941 parm->parm.capture.timeperframe = s.frameperiod;
2942 return 0; 2940 return 0;
2943} 2941}
2944 2942