From: Devin Heitmueller Date: Fri, 11 Sep 2009 03:08:44 +0000 (-0300) Subject: V4L/DVB (12747): em28xx: only advertise VBI capability if supported X-Git-Tag: v2.6.32-rc1~618^2~208 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=0414614aab32d84da2bb092eb83b5e456946022d;p=karo-tx-linux.git 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 Signed-off-by: Mauro Carvalho Chehab --- 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;