aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/uvc/uvc_driver.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/uvc/uvc_driver.c')
-rw-r--r--drivers/media/video/uvc/uvc_driver.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/drivers/media/video/uvc/uvc_driver.c b/drivers/media/video/uvc/uvc_driver.c
index 838b56f097cf..7eaf99b22a48 100644
--- a/drivers/media/video/uvc/uvc_driver.c
+++ b/drivers/media/video/uvc/uvc_driver.c
@@ -637,14 +637,13 @@ static int uvc_parse_streaming(struct uvc_device *dev,
637 } 637 }
638 streaming->header.bControlSize = n; 638 streaming->header.bControlSize = n;
639 639
640 streaming->header.bmaControls = kmalloc(p*n, GFP_KERNEL); 640 streaming->header.bmaControls = kmemdup(&buffer[size], p * n,
641 GFP_KERNEL);
641 if (streaming->header.bmaControls == NULL) { 642 if (streaming->header.bmaControls == NULL) {
642 ret = -ENOMEM; 643 ret = -ENOMEM;
643 goto error; 644 goto error;
644 } 645 }
645 646
646 memcpy(streaming->header.bmaControls, &buffer[size], p*n);
647
648 buflen -= buffer[0]; 647 buflen -= buffer[0];
649 buffer += buffer[0]; 648 buffer += buffer[0];
650 649
@@ -2174,6 +2173,15 @@ static struct usb_device_id uvc_ids[] = {
2174 .bInterfaceSubClass = 1, 2173 .bInterfaceSubClass = 1,
2175 .bInterfaceProtocol = 0, 2174 .bInterfaceProtocol = 0,
2176 .driver_info = UVC_QUIRK_PROBE_EXTRAFIELDS }, 2175 .driver_info = UVC_QUIRK_PROBE_EXTRAFIELDS },
2176 /* Manta MM-353 Plako */
2177 { .match_flags = USB_DEVICE_ID_MATCH_DEVICE
2178 | USB_DEVICE_ID_MATCH_INT_INFO,
2179 .idVendor = 0x18ec,
2180 .idProduct = 0x3188,
2181 .bInterfaceClass = USB_CLASS_VIDEO,
2182 .bInterfaceSubClass = 1,
2183 .bInterfaceProtocol = 0,
2184 .driver_info = UVC_QUIRK_PROBE_MINMAX },
2177 /* FSC WebCam V30S */ 2185 /* FSC WebCam V30S */
2178 { .match_flags = USB_DEVICE_ID_MATCH_DEVICE 2186 { .match_flags = USB_DEVICE_ID_MATCH_DEVICE
2179 | USB_DEVICE_ID_MATCH_INT_INFO, 2187 | USB_DEVICE_ID_MATCH_INT_INFO,
@@ -2261,6 +2269,7 @@ static int __init uvc_init(void)
2261static void __exit uvc_cleanup(void) 2269static void __exit uvc_cleanup(void)
2262{ 2270{
2263 usb_deregister(&uvc_driver.driver); 2271 usb_deregister(&uvc_driver.driver);
2272 uvc_ctrl_cleanup();
2264} 2273}
2265 2274
2266module_init(uvc_init); 2275module_init(uvc_init);