V4L/DVB (12747): em28xx: only advertise VBI capability if supported
authorDevin Heitmueller <dheitmueller@kernellabs.com>
Fri, 11 Sep 2009 03:08:44 +0000 (00:08 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Sat, 19 Sep 2009 02:47:44 +0000 (23:47 -0300)
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>
drivers/media/video/em28xx/em28xx-video.c

index a5632c7e6438226d4a0bfdf2a3ddd6b43184fda4..8955b7b5365f53709fb22081673270f630856b32 100644 (file)
@@ -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;