summaryrefslogtreecommitdiffstats
path: root/drivers/media/video/v4l2-ioctl.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2011-06-24 18:14:14 +0200
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-07-27 22:53:12 +0200
commitae6db5154671759426046c2cbc2e20a82ff0feed (patch)
treeae18ddcd887dd3b978de912562946e94e212695a /drivers/media/video/v4l2-ioctl.c
parent[media] DocBook/v4l: Remove references to the old V4L1 compat layer (diff)
downloadlinux-ae6db5154671759426046c2cbc2e20a82ff0feed.tar.xz
linux-ae6db5154671759426046c2cbc2e20a82ff0feed.zip
[media] v4l2-ioctl: Add a default value for kernel version
Most drivers don't increase kernel versions as newer features are added or bug fixes are solved. So, vidioc_querycap returned value for cap->version is meaningless. Instead of keeping this situation forever, let's add a default value matching the current Linux version. Drivers that want to keep their own version control can still do it, as they can override the default value for cap->version. Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/v4l2-ioctl.c')
-rw-r--r--drivers/media/video/v4l2-ioctl.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/media/video/v4l2-ioctl.c b/drivers/media/video/v4l2-ioctl.c
index 55df1436f835..48b94fcb6a25 100644
--- a/drivers/media/video/v4l2-ioctl.c
+++ b/drivers/media/video/v4l2-ioctl.c
@@ -16,6 +16,7 @@
#include <linux/slab.h>
#include <linux/types.h>
#include <linux/kernel.h>
+#include <linux/version.h>
#include <linux/videodev2.h>
@@ -605,6 +606,7 @@ static long __video_do_ioctl(struct file *file,
if (!ops->vidioc_querycap)
break;
+ cap->version = LINUX_VERSION_CODE;
ret = ops->vidioc_querycap(file, fh, cap);
if (!ret)
dbgarg(cmd, "driver=%s, card=%s, bus=%s, "