summaryrefslogtreecommitdiff
path: root/linux/drivers/media/common/saa7146_video.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2008-07-27 09:14:54 -0300
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-07-27 09:14:54 -0300
commit3590a589476f8094edb2a807adaa699215c2d5ee (patch)
treec3948f8afa605f7810666ccdf60ca5b7b6cda406 /linux/drivers/media/common/saa7146_video.c
parent53cd728fba53912604889bec57b74645ac73365c (diff)
parentde70eb5e79c86c8efc2c0568c70f44bf0752c336 (diff)
downloadmediapointer-dvb-s2-3590a589476f8094edb2a807adaa699215c2d5ee.tar.gz
mediapointer-dvb-s2-3590a589476f8094edb2a807adaa699215c2d5ee.tar.bz2
merge: http://www.linuxtv.org/hg/~hverkuil/v4l-dvb-videodev
From: Mauro Carvalho Chehab <mchehab@infradead.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'linux/drivers/media/common/saa7146_video.c')
-rw-r--r--linux/drivers/media/common/saa7146_video.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/linux/drivers/media/common/saa7146_video.c b/linux/drivers/media/common/saa7146_video.c
index d3185e610..a2333bff8 100644
--- a/linux/drivers/media/common/saa7146_video.c
+++ b/linux/drivers/media/common/saa7146_video.c
@@ -959,21 +959,18 @@ int saa7146_video_do_ioctl(struct inode *inode, struct file *file, unsigned int
case VIDIOC_ENUM_FMT:
{
struct v4l2_fmtdesc *f = arg;
- int index;
switch (f->type) {
case V4L2_BUF_TYPE_VIDEO_CAPTURE:
- case V4L2_BUF_TYPE_VIDEO_OVERLAY: {
- index = f->index;
- if (index < 0 || index >= NUM_FORMATS) {
+ case V4L2_BUF_TYPE_VIDEO_OVERLAY:
+ if (f->index >= NUM_FORMATS)
return -EINVAL;
- }
- memset(f,0,sizeof(*f));
- f->index = index;
- strlcpy((char *)f->description,formats[index].name,sizeof(f->description));
- f->pixelformat = formats[index].pixelformat;
+ strlcpy((char *)f->description, formats[f->index].name,
+ sizeof(f->description));
+ f->pixelformat = formats[f->index].pixelformat;
+ f->flags = 0;
+ memset(f->reserved, 0, sizeof(f->reserved));
break;
- }
default:
return -EINVAL;
}