diff options
author | Thierry Reding <thierry.reding@avionic-design.de> | 2011-08-04 03:14:15 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-08-31 16:21:24 -0400 |
commit | aa4a583d3539729d1cbd64cda7a8be078a824df8 (patch) | |
tree | fdcfbf30d020280319d7146978c1203b292cbbe5 /drivers | |
parent | dd0c8abf2ac853dad9a360f5e9d3d1cb5e5f7621 (diff) |
[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: Thierry Reding <thierry.reding@avionic-design.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/staging/tm6000/tm6000-video.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/drivers/staging/tm6000/tm6000-video.c b/drivers/staging/tm6000/tm6000-video.c index df8e25301d2..1e5ace0b5d1 100644 --- a/drivers/staging/tm6000/tm6000-video.c +++ b/drivers/staging/tm6000/tm6000-video.c | |||
@@ -1530,13 +1530,13 @@ static int tm6000_open(struct file *file) | |||
1530 | dev->mode = TM6000_MODE_ANALOG; | 1530 | dev->mode = TM6000_MODE_ANALOG; |
1531 | } | 1531 | } |
1532 | 1532 | ||
1533 | videobuf_queue_vmalloc_init(&fh->vb_vidq, &tm6000_video_qops, | 1533 | if (!fh->radio) { |
1534 | NULL, &dev->slock, | 1534 | videobuf_queue_vmalloc_init(&fh->vb_vidq, &tm6000_video_qops, |
1535 | fh->type, | 1535 | NULL, &dev->slock, |
1536 | V4L2_FIELD_INTERLACED, | 1536 | fh->type, |
1537 | sizeof(struct tm6000_buffer), fh, &dev->lock); | 1537 | V4L2_FIELD_INTERLACED, |
1538 | 1538 | sizeof(struct tm6000_buffer), fh, &dev->lock); | |
1539 | if (fh->radio) { | 1539 | } else { |
1540 | dprintk(dev, V4L2_DEBUG_OPEN, "video_open: setting radio device\n"); | 1540 | dprintk(dev, V4L2_DEBUG_OPEN, "video_open: setting radio device\n"); |
1541 | dev->input = 5; | 1541 | dev->input = 5; |
1542 | tm6000_set_audio_rinput(dev); | 1542 | tm6000_set_audio_rinput(dev); |
@@ -1608,7 +1608,9 @@ static int tm6000_release(struct file *file) | |||
1608 | int err; | 1608 | int err; |
1609 | 1609 | ||
1610 | tm6000_uninit_isoc(dev); | 1610 | tm6000_uninit_isoc(dev); |
1611 | videobuf_mmap_free(&fh->vb_vidq); | 1611 | |
1612 | if (!fh->radio) | ||
1613 | videobuf_mmap_free(&fh->vb_vidq); | ||
1612 | 1614 | ||
1613 | err = tm6000_reset(dev); | 1615 | err = tm6000_reset(dev); |
1614 | if (err < 0) | 1616 | if (err < 0) |