Skip to content

Commit

Permalink
V4L/DVB (13826): uvcvideo: Fix controls blacklisting
Browse files Browse the repository at this point in the history
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: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Laurent Pinchart authored and Mauro Carvalho Chehab committed Jan 17, 2010
1 parent 1faea56 commit 385097e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/media/video/uvc/uvc_ctrl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1393,7 +1393,7 @@ uvc_ctrl_prune_entity(struct uvc_device *dev, struct uvc_entity *entity)
size = entity->processing.bControlSize;

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;

if (blacklist[i].index >= 8 * size ||
Expand Down

0 comments on commit 385097e

Please sign in to comment.