Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 39578
b: refs/heads/master
c: 83427ac
h: refs/heads/master
v: v3
  • Loading branch information
Jonathan Corbet authored and Mauro Carvalho Chehab committed Oct 14, 2006
1 parent ad23a8c commit b7786af
Show file tree
Hide file tree
Showing 2 changed files with 10 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: c12e3be0860652ed1e15c9442adcba44317211d1
refs/heads/master: 83427ac5d643308ccb36e05d525949952bdedc27
11 changes: 9 additions & 2 deletions trunk/drivers/media/video/videodev.c
Original file line number Diff line number Diff line change
Expand Up @@ -1288,6 +1288,7 @@ static int __video_do_ioctl(struct inode *inode, struct file *file,
ret=vfd->vidioc_g_parm(file, fh, p);
} else {
struct v4l2_standard s;
int i;

if (!vfd->tvnormsize) {
printk (KERN_WARNING "%s: no TV norms defined!\n",
Expand All @@ -1298,8 +1299,14 @@ static int __video_do_ioctl(struct inode *inode, struct file *file,
if (p->type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
return -EINVAL;

v4l2_video_std_construct(&s, vfd->tvnorms[vfd->current_norm].id,
vfd->tvnorms[vfd->current_norm].name);
for (i = 0; i < vfd->tvnormsize; i++)
if (vfd->tvnorms[i].id == vfd->current_norm)
break;
if (i >= vfd->tvnormsize)
return -EINVAL;

v4l2_video_std_construct(&s, vfd->current_norm,
vfd->tvnorms[i].name);

memset(p,0,sizeof(*p));

Expand Down

0 comments on commit b7786af

Please sign in to comment.