Hi Paulo, thanks a lot for the bug report and the proposed fixes.
>From 2.6.21 onwards the kernel provides a usb_match_one_id() function that matches perfectly what the driver needs here. In order to keep compatibility with < 2.6.21 kernels on the linuxtv.org tree, I've committed a patch that checks the idVendor and idProduct values directly (after converting them from little-endian to cpu-endian, which was forgotten in your first patch). For the record, here's the patch. # HG changeset patch # User Laurent Pinchart <laurent.pinch...@ideasonboard.com> # Date 1260408681 -3600 # Node ID 0826158f044cfc144681aa2e716a3825d8d84ce7 # Parent 065f9e34e07bea91007d787ae75ada7570cccf5c uvcvideo: Fix controls blacklisting From: Laurent Pinchart <laurent.pinch...@ideasonboard.com> The control blacklisting code erroneously used usb_match_id() by passing a pointer to a usb_device_id structure instead of an array of such structures. Replace the usb_match_id() call by usb_match_id_one(). Thanks to Paulo Assis for diagnosing the bug and providing an initial fix. Priority: normal Signed-off-by: Laurent Pinchart <laurent.pinch...@ideasonboard.com> diff -r 065f9e34e07b -r 0826158f044c linux/drivers/media/video/uvc/uvc_ctrl.c --- a/linux/drivers/media/video/uvc/uvc_ctrl.c Mon Dec 07 10:08:33 2009 -0200 +++ b/linux/drivers/media/video/uvc/uvc_ctrl.c Thu Dec 10 02:31:21 2009 +0100 @@ -1395,7 +1395,14 @@ size = entity->processing.bControlSize; for (i = 0; i < ARRAY_SIZE(blacklist); ++i) { - if (!usb_match_id(dev->intf, &blacklist[i].id)) +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 21) + if ((blacklist[i].id.idVendor != + le16_to_cpu(dev->udev->descriptor.idVendor)) || + (blacklist[i].id.idProduct != + le16_to_cpu(dev->udev->descriptor.idProduct))) +#else + if (!usb_match_one_id(dev->intf, &blacklist[i].id)) +#endif continue; if (blacklist[i].index >= 8 * size || -- Best regards, Laurent Pinchart _______________________________________________ Linux-uvc-devel mailing list Linux-uvc-devel@lists.berlios.de https://lists.berlios.de/mailman/listinfo/linux-uvc-devel