Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 319928
b: refs/heads/master
c: 9a60139
h: refs/heads/master
v: v3
  • Loading branch information
Akinobu Mita authored and Linus Torvalds committed Jul 31, 2012
1 parent f5d11db commit 78de382
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0121ad62c20ed779e38ad689071da2805f03249f
refs/heads/master: 9a601396e8681d9884a9f429cba7ceb2b2a4d21c
5 changes: 2 additions & 3 deletions trunk/drivers/media/video/uvc/uvc_ctrl.c
Original file line number Diff line number Diff line change
Expand Up @@ -2083,7 +2083,7 @@ int uvc_ctrl_init_device(struct uvc_device *dev)
/* Walk the entities list and instantiate controls */
list_for_each_entry(entity, &dev->entities, list) {
struct uvc_control *ctrl;
unsigned int bControlSize = 0, ncontrols = 0;
unsigned int bControlSize = 0, ncontrols;
__u8 *bmControls = NULL;

if (UVC_ENTITY_TYPE(entity) == UVC_VC_EXTENSION_UNIT) {
Expand All @@ -2101,8 +2101,7 @@ int uvc_ctrl_init_device(struct uvc_device *dev)
uvc_ctrl_prune_entity(dev, entity);

/* Count supported controls and allocate the controls array */
for (i = 0; i < bControlSize; ++i)
ncontrols += hweight8(bmControls[i]);
ncontrols = memweight(bmControls, bControlSize);
if (ncontrols == 0)
continue;

Expand Down

0 comments on commit 78de382

Please sign in to comment.