[media] uvcvideo: Use LINUX_VERSION_CODE for VIDIOC_QUERYCAP
authorMauro Carvalho Chehab <mchehab@redhat.com>
Sat, 25 Jun 2011 16:50:37 +0000 (13:50 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Wed, 27 Jul 2011 20:53:15 +0000 (17:53 -0300)
uvcvideo doesn't use vidioc_ioctl2. As the API is changing to use
a common version for all drivers, we need to expliticly fix this
driver.

Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/uvc/uvc_driver.c
drivers/media/video/uvc/uvc_v4l2.c
drivers/media/video/uvc/uvcvideo.h

index b6eae48d7fb802f53a950b90ef3f9107f96e9271..749c722226652c54c4debf7ed1ffc45de22a07ea 100644 (file)
@@ -31,6 +31,7 @@
 #include <linux/videodev2.h>
 #include <linux/vmalloc.h>
 #include <linux/wait.h>
+#include <linux/version.h>
 #include <asm/atomic.h>
 #include <asm/unaligned.h>
 
@@ -1857,7 +1858,7 @@ static int uvc_probe(struct usb_interface *intf,
                        sizeof(dev->mdev.serial));
        strcpy(dev->mdev.bus_info, udev->devpath);
        dev->mdev.hw_revision = le16_to_cpu(udev->descriptor.bcdDevice);
-       dev->mdev.driver_version = DRIVER_VERSION_NUMBER;
+       dev->mdev.driver_version = LINUX_VERSION_CODE;
        if (media_device_register(&dev->mdev) < 0)
                goto error;
 
index 543a80395b7f57d2c122049a7d8e69fc27a50901..cdd967b0a2e9e75a1bb1c086520d326a9e333323 100644 (file)
@@ -571,7 +571,7 @@ static long uvc_v4l2_do_ioctl(struct file *file, unsigned int cmd, void *arg)
                strlcpy(cap->card, vdev->name, sizeof cap->card);
                usb_make_path(stream->dev->udev,
                              cap->bus_info, sizeof(cap->bus_info));
-               cap->version = DRIVER_VERSION_NUMBER;
+               cap->version = LINUX_VERSION_CODE;
                if (stream->type == V4L2_BUF_TYPE_VIDEO_CAPTURE)
                        cap->capabilities = V4L2_CAP_VIDEO_CAPTURE
                                          | V4L2_CAP_STREAMING;
index 20107fd3574da44508f69835e5fc098b3eec86a6..df32a43ca86a71db60c31bc92751aa0a2308615e 100644 (file)
@@ -183,8 +183,7 @@ struct uvc_xu_control {
  * Driver specific constants.
  */
 
-#define DRIVER_VERSION_NUMBER  KERNEL_VERSION(1, 1, 0)
-#define DRIVER_VERSION         "v1.1.0"
+#define DRIVER_VERSION         "1.1.1"
 
 /* Number of isochronous URBs. */
 #define UVC_URBS               5