diff options
Diffstat (limited to 'drivers/media/video/uvc/uvc_driver.c')
-rw-r--r-- | drivers/media/video/uvc/uvc_driver.c | 41 |
1 files changed, 35 insertions, 6 deletions
diff --git a/drivers/media/video/uvc/uvc_driver.c b/drivers/media/video/uvc/uvc_driver.c index 656d4c9e3b9f..1d131720b6d7 100644 --- a/drivers/media/video/uvc/uvc_driver.c +++ b/drivers/media/video/uvc/uvc_driver.c @@ -23,6 +23,7 @@ * codec can't handle MJPEG data. */ +#include <linux/atomic.h> #include <linux/kernel.h> #include <linux/list.h> #include <linux/module.h> @@ -32,7 +33,6 @@ #include <linux/vmalloc.h> #include <linux/wait.h> #include <linux/version.h> -#include <asm/atomic.h> #include <asm/unaligned.h> #include <media/v4l2-common.h> @@ -1675,6 +1675,8 @@ static void uvc_unregister_video(struct uvc_device *dev) video_unregister_device(stream->vdev); stream->vdev = NULL; + + uvc_debugfs_cleanup_stream(stream); } /* Decrement the stream count and call uvc_delete explicitly if there @@ -1700,6 +1702,8 @@ static int uvc_register_video(struct uvc_device *dev, return ret; } + uvc_debugfs_init_stream(stream); + /* Register the device with V4L. */ vdev = video_device_alloc(); if (vdev == NULL) { @@ -2033,6 +2037,15 @@ MODULE_PARM_DESC(timeout, "Streaming control requests timeout"); * though they are compliant. */ static struct usb_device_id uvc_ids[] = { + /* LogiLink Wireless Webcam */ + { .match_flags = USB_DEVICE_ID_MATCH_DEVICE + | USB_DEVICE_ID_MATCH_INT_INFO, + .idVendor = 0x0416, + .idProduct = 0xa91a, + .bInterfaceClass = USB_CLASS_VIDEO, + .bInterfaceSubClass = 1, + .bInterfaceProtocol = 0, + .driver_info = UVC_QUIRK_PROBE_MINMAX }, /* Genius eFace 2025 */ { .match_flags = USB_DEVICE_ID_MATCH_DEVICE | USB_DEVICE_ID_MATCH_INT_INFO, @@ -2126,6 +2139,15 @@ static struct usb_device_id uvc_ids[] = { .bInterfaceSubClass = 1, .bInterfaceProtocol = 0, .driver_info = UVC_QUIRK_PROBE_MINMAX }, + /* Dell XPS m1530 */ + { .match_flags = USB_DEVICE_ID_MATCH_DEVICE + | USB_DEVICE_ID_MATCH_INT_INFO, + .idVendor = 0x05a9, + .idProduct = 0x2640, + .bInterfaceClass = USB_CLASS_VIDEO, + .bInterfaceSubClass = 1, + .bInterfaceProtocol = 0, + .driver_info = UVC_QUIRK_PROBE_DEF }, /* Apple Built-In iSight */ { .match_flags = USB_DEVICE_ID_MATCH_DEVICE | USB_DEVICE_ID_MATCH_INT_INFO, @@ -2396,17 +2418,24 @@ struct uvc_driver uvc_driver = { static int __init uvc_init(void) { - int result; + int ret; + + uvc_debugfs_init(); - result = usb_register(&uvc_driver.driver); - if (result == 0) - printk(KERN_INFO DRIVER_DESC " (" DRIVER_VERSION ")\n"); - return result; + ret = usb_register(&uvc_driver.driver); + if (ret < 0) { + uvc_debugfs_cleanup(); + return ret; + } + + printk(KERN_INFO DRIVER_DESC " (" DRIVER_VERSION ")\n"); + return 0; } static void __exit uvc_cleanup(void) { usb_deregister(&uvc_driver.driver); + uvc_debugfs_cleanup(); } module_init(uvc_init); |