diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-10-12 12:11:55 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-10-21 01:17:53 -0200 |
commit | 589851d5990f85cce884f831ec70b9aa40b7ad5f (patch) | |
tree | 88f82461505b2a552245df2c325f3596ad0084d8 /drivers/staging/tm6000/tm6000-video.c | |
parent | 421d1b70718232dfbd386f67b135f5e23f569c6e (diff) |
[media] V4L-DVB: tm6000: Move VBI init to a separate function
While here, documment that VBI may need changes, based on video STD, and
do some cleanup at device init, to be sure that VBI init will happen
all the times, and to remove a duplicated video standard call.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/staging/tm6000/tm6000-video.c')
-rw-r--r-- | drivers/staging/tm6000/tm6000-video.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/drivers/staging/tm6000/tm6000-video.c b/drivers/staging/tm6000/tm6000-video.c index 9304158db6da..84ab49d1618c 100644 --- a/drivers/staging/tm6000/tm6000-video.c +++ b/drivers/staging/tm6000/tm6000-video.c @@ -1015,7 +1015,6 @@ static int vidioc_s_std (struct file *file, void *priv, v4l2_std_id *norm) struct tm6000_fh *fh=priv; struct tm6000_core *dev = fh->dev; - rc = tm6000_set_standard(dev, norm); rc = tm6000_init_analog_mode(dev); fh->width = dev->width; @@ -1293,18 +1292,17 @@ static int tm6000_open(struct file *file) "active=%d\n",list_empty(&dev->vidq.active)); /* initialize hardware on analog mode */ -// if (dev->mode!=TM6000_MODE_ANALOG) { -// rc = tm6000_set_standard(dev, dev->norm); - rc += tm6000_init_analog_mode(dev); - if (rc < 0) - return rc; + rc = tm6000_init_analog_mode(dev); + if (rc < 0) + return rc; + if (dev->mode != TM6000_MODE_ANALOG) { /* Put all controls at a sane state */ for (i = 0; i < ARRAY_SIZE(tm6000_qctrl); i++) - qctl_regs[i] =tm6000_qctrl[i].default_value; + qctl_regs[i] = tm6000_qctrl[i].default_value; - dev->mode=TM6000_MODE_ANALOG; -// } + dev->mode = TM6000_MODE_ANALOG; + } videobuf_queue_vmalloc_init(&fh->vb_vidq, &tm6000_video_qops, NULL, &dev->slock, |