diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2010-09-20 05:53:21 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-10-21 01:18:21 -0200 |
commit | ba2fa99668bb9bf03757a020f15bba295d5c0a3e (patch) | |
tree | 10fc8a0bc168ddb78ebfcd71402fe250372e1da5 /drivers/media/video/uvc/uvc_driver.c | |
parent | 650b95feee353305203724cb2e8b2bc50f6d130a (diff) |
[media] uvcvideo: Hardcode the index/selector relationship for XU controls
Devices advertise XU controls using a bitmask, in which each bit
corresponds to a control. The control selector, used to query the
control, isn't available in the USB descriptors.
All known UVC devices use control selectors equal to the control bit
index plus one. Hardcode that relationship in the driver, making the
UVCIOC_CTRL_ADD ioctl obsolete. All necessary information about XU
controls can be obtained by the driver at enumeration time.
The UVCIOC_CTRL_ADD ioctl is still supported for compatibility reasons,
but now always returns -EEXIST.
Finally, control mappings are now on a per-device basis and no longer
global.
As this changes the userspace interface, bump the driver version number
to 1.0.0 (it was about time).
Signed-off-by: Martin Rubli <martin_rubli@logitech.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/uvc/uvc_driver.c')
-rw-r--r-- | drivers/media/video/uvc/uvc_driver.c | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/drivers/media/video/uvc/uvc_driver.c b/drivers/media/video/uvc/uvc_driver.c index dc035c0b258..71efda76cc7 100644 --- a/drivers/media/video/uvc/uvc_driver.c +++ b/drivers/media/video/uvc/uvc_driver.c @@ -41,9 +41,6 @@ #define DRIVER_AUTHOR "Laurent Pinchart " \ "<laurent.pinchart@ideasonboard.com>" #define DRIVER_DESC "USB Video Class driver" -#ifndef DRIVER_VERSION -#define DRIVER_VERSION "v0.1.0" -#endif unsigned int uvc_clock_param = CLOCK_MONOTONIC; unsigned int uvc_no_drop_param; @@ -2289,12 +2286,6 @@ static int __init uvc_init(void) { int result; - INIT_LIST_HEAD(&uvc_driver.devices); - INIT_LIST_HEAD(&uvc_driver.controls); - mutex_init(&uvc_driver.ctrl_mutex); - - uvc_ctrl_init(); - result = usb_register(&uvc_driver.driver); if (result == 0) printk(KERN_INFO DRIVER_DESC " (" DRIVER_VERSION ")\n"); @@ -2304,7 +2295,6 @@ static int __init uvc_init(void) static void __exit uvc_cleanup(void) { usb_deregister(&uvc_driver.driver); - uvc_ctrl_cleanup(); } module_init(uvc_init); |