提交 aa4a583d 编写于 作者: T Thierry Reding 提交者: Mauro Carvalho Chehab

[media] tm6000: Do not use video buffers in radio mode

If the radio device is opened there is no need to initialize the video
buffer queue because it is not used.
Signed-off-by: NThierry Reding <thierry.reding@avionic-design.de>
Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
上级 dd0c8abf
...@@ -1530,13 +1530,13 @@ static int tm6000_open(struct file *file) ...@@ -1530,13 +1530,13 @@ static int tm6000_open(struct file *file)
dev->mode = TM6000_MODE_ANALOG; dev->mode = TM6000_MODE_ANALOG;
} }
videobuf_queue_vmalloc_init(&fh->vb_vidq, &tm6000_video_qops, if (!fh->radio) {
NULL, &dev->slock, videobuf_queue_vmalloc_init(&fh->vb_vidq, &tm6000_video_qops,
fh->type, NULL, &dev->slock,
V4L2_FIELD_INTERLACED, fh->type,
sizeof(struct tm6000_buffer), fh, &dev->lock); V4L2_FIELD_INTERLACED,
sizeof(struct tm6000_buffer), fh, &dev->lock);
if (fh->radio) { } else {
dprintk(dev, V4L2_DEBUG_OPEN, "video_open: setting radio device\n"); dprintk(dev, V4L2_DEBUG_OPEN, "video_open: setting radio device\n");
dev->input = 5; dev->input = 5;
tm6000_set_audio_rinput(dev); tm6000_set_audio_rinput(dev);
...@@ -1608,7 +1608,9 @@ static int tm6000_release(struct file *file) ...@@ -1608,7 +1608,9 @@ static int tm6000_release(struct file *file)
int err; int err;
tm6000_uninit_isoc(dev); tm6000_uninit_isoc(dev);
videobuf_mmap_free(&fh->vb_vidq);
if (!fh->radio)
videobuf_mmap_free(&fh->vb_vidq);
err = tm6000_reset(dev); err = tm6000_reset(dev);
if (err < 0) if (err < 0)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册