Commit 385097e0 authored by Laurent Pinchart's avatar Laurent Pinchart Committed by Mauro Carvalho Chehab

V4L/DVB (13826): uvcvideo: Fix controls blacklisting

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.
Signed-off-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 1faea560
...@@ -1393,7 +1393,7 @@ uvc_ctrl_prune_entity(struct uvc_device *dev, struct uvc_entity *entity) ...@@ -1393,7 +1393,7 @@ uvc_ctrl_prune_entity(struct uvc_device *dev, struct uvc_entity *entity)
size = entity->processing.bControlSize; size = entity->processing.bControlSize;
for (i = 0; i < ARRAY_SIZE(blacklist); ++i) { for (i = 0; i < ARRAY_SIZE(blacklist); ++i) {
if (!usb_match_id(dev->intf, &blacklist[i].id)) if (!usb_match_one_id(dev->intf, &blacklist[i].id))
continue; continue;
if (blacklist[i].index >= 8 * size || if (blacklist[i].index >= 8 * size ||
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment