summaryrefslogtreecommitdiff
path: root/linux/drivers
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2007-04-24 13:40:07 -0300
committerMauro Carvalho Chehab <mchehab@infradead.org>2007-04-24 13:40:07 -0300
commit97120a47826d8984da2c888c7e8adb2aff7ee509 (patch)
tree6656e3d1ddf44c78730996791e104f7577522af2 /linux/drivers
parentddcfa3e8881b2b500c4398063f74562a47c1edde (diff)
downloadmediapointer-dvb-s2-97120a47826d8984da2c888c7e8adb2aff7ee509.tar.gz
mediapointer-dvb-s2-97120a47826d8984da2c888c7e8adb2aff7ee509.tar.bz2
Fix: vidioc_g_parm were not zeroing the memory
From: Mauro Carvalho Chehab <mchehab@infradead.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'linux/drivers')
-rw-r--r--linux/drivers/media/video/videodev.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/linux/drivers/media/video/videodev.c b/linux/drivers/media/video/videodev.c
index acb3c4fbf..0443be210 100644
--- a/linux/drivers/media/video/videodev.c
+++ b/linux/drivers/media/video/videodev.c
@@ -1427,6 +1427,11 @@ static int __video_do_ioctl(struct inode *inode, struct file *file,
case VIDIOC_G_PARM:
{
struct v4l2_streamparm *p=arg;
+ __u32 type=p->type;
+
+ memset(p,0,sizeof(*p));
+ p->type=type;
+
if (vfd->vidioc_g_parm) {
ret=vfd->vidioc_g_parm(file, fh, p);
} else {
@@ -1438,8 +1443,6 @@ static int __video_do_ioctl(struct inode *inode, struct file *file,
v4l2_video_std_construct(&s, vfd->current_norm,
v4l2_norm_to_name(vfd->current_norm));
- memset(p,0,sizeof(*p));
-
p->parm.capture.timeperframe = s.frameperiod;
ret=0;
}