summaryrefslogtreecommitdiffstats
path: root/drivers/media/video/em28xx/em28xx-video.c
diff options
context:
space:
mode:
authorDevin Heitmueller <dheitmueller@kernellabs.com>2009-09-11 05:08:44 +0200
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-09-19 04:47:44 +0200
commit0414614aab32d84da2bb092eb83b5e456946022d (patch)
tree1b509b31c9694bdae61c0799283c4aa4d56ab12e /drivers/media/video/em28xx/em28xx-video.c
parentV4L/DVB (12746): em28xx: do not create /dev/vbiX device if VBI not supported (diff)
downloadlinux-0414614aab32d84da2bb092eb83b5e456946022d.tar.xz
linux-0414614aab32d84da2bb092eb83b5e456946022d.zip
V4L/DVB (12747): em28xx: only advertise VBI capability if supported
Change the code so we only claim to support VBI if the underlying chipset actually has the support. This work was sponsored by EyeMagnet Limited. Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/em28xx/em28xx-video.c')
-rw-r--r--drivers/media/video/em28xx/em28xx-video.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/media/video/em28xx/em28xx-video.c b/drivers/media/video/em28xx/em28xx-video.c
index a5632c7e6438..8955b7b5365f 100644
--- a/drivers/media/video/em28xx/em28xx-video.c
+++ b/drivers/media/video/em28xx/em28xx-video.c
@@ -1758,11 +1758,13 @@ static int vidioc_querycap(struct file *file, void *priv,
cap->version = EM28XX_VERSION_CODE;
cap->capabilities =
- V4L2_CAP_VBI_CAPTURE |
V4L2_CAP_SLICED_VBI_CAPTURE |
V4L2_CAP_VIDEO_CAPTURE |
V4L2_CAP_READWRITE | V4L2_CAP_STREAMING;
+ if (dev->vbi_dev)
+ cap->capabilities |= V4L2_CAP_VBI_CAPTURE;
+
if (dev->audio_mode.has_audio)
cap->capabilities |= V4L2_CAP_AUDIO;