Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 250202
b: refs/heads/master
c: 6588687
h: refs/heads/master
v: v3
  • Loading branch information
Jean-Francois Moine authored and Mauro Carvalho Chehab committed May 20, 2011
1 parent 46f32b6 commit 11c7ba2
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 3 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: fd206508492caffaccc36cbfc40d3b1f8eeb1f0b
refs/heads/master: 6588687a602ee5d97aad92a5910db1be16a4f6df
23 changes: 21 additions & 2 deletions trunk/drivers/media/video/pwc/pwc-v4l.c
Original file line number Diff line number Diff line change
Expand Up @@ -379,8 +379,27 @@ static int pwc_s_input(struct file *file, void *fh, unsigned int i)

static int pwc_queryctrl(struct file *file, void *fh, struct v4l2_queryctrl *c)
{
int i;

int i, idx;
u32 id;

id = c->id;
if (id & V4L2_CTRL_FLAG_NEXT_CTRL) {
id &= V4L2_CTRL_ID_MASK;
id++;
idx = -1;
for (i = 0; i < ARRAY_SIZE(pwc_controls); i++) {
if (pwc_controls[i].id < id)
continue;
if (idx >= 0
&& pwc_controls[i].id > pwc_controls[idx].id)
continue;
idx = i;
}
if (idx < 0)
return -EINVAL;
memcpy(c, &pwc_controls[idx], sizeof pwc_controls[0]);
return 0;
}
for (i = 0; i < sizeof(pwc_controls) / sizeof(struct v4l2_queryctrl); i++) {
if (pwc_controls[i].id == c->id) {
PWC_DEBUG_IOCTL("ioctl(VIDIOC_QUERYCTRL) found\n");
Expand Down

0 comments on commit 11c7ba2

Please sign in to comment.