aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/videodev.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2006-11-20 10:10:43 -0500
committerMauro Carvalho Chehab <mchehab@infradead.org>2006-12-10 06:04:59 -0500
commit7964b1b1c27dea88eb89b10f774893ec11cf973d (patch)
tree31778358758d9cb6c23a0f32a034f116a85ac47d /drivers/media/video/videodev.c
parent2aa92ffd58493887adde850fe510031e48f12bac (diff)
V4L/DVB (4859): Fix initializations on some video_ioctl2 handlers
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/videodev.c')
-rw-r--r--drivers/media/video/videodev.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/media/video/videodev.c b/drivers/media/video/videodev.c
index 41ec0c4b35a2..9024ea2557fd 100644
--- a/drivers/media/video/videodev.c
+++ b/drivers/media/video/videodev.c
@@ -1088,9 +1088,13 @@ static int __video_do_ioctl(struct inode *inode, struct file *file,
1088 case VIDIOC_G_AUDIO: 1088 case VIDIOC_G_AUDIO:
1089 { 1089 {
1090 struct v4l2_audio *p=arg; 1090 struct v4l2_audio *p=arg;
1091 __u32 index=p->index;
1091 1092
1092 if (!vfd->vidioc_g_audio) 1093 if (!vfd->vidioc_g_audio)
1093 break; 1094 break;
1095
1096 memset(p,0,sizeof(*p));
1097 p->index=index;
1094 dbgarg(cmd, "Get for index=%d\n", p->index); 1098 dbgarg(cmd, "Get for index=%d\n", p->index);
1095 ret=vfd->vidioc_g_audio(file, fh, p); 1099 ret=vfd->vidioc_g_audio(file, fh, p);
1096 if (!ret) 1100 if (!ret)
@@ -1329,8 +1333,14 @@ static int __video_do_ioctl(struct inode *inode, struct file *file,
1329 case VIDIOC_G_TUNER: 1333 case VIDIOC_G_TUNER:
1330 { 1334 {
1331 struct v4l2_tuner *p=arg; 1335 struct v4l2_tuner *p=arg;
1336 __u32 index=p->index;
1337
1332 if (!vfd->vidioc_g_tuner) 1338 if (!vfd->vidioc_g_tuner)
1333 break; 1339 break;
1340
1341 memset(p,0,sizeof(*p));
1342 p->index=index;
1343
1334 ret=vfd->vidioc_g_tuner(file, fh, p); 1344 ret=vfd->vidioc_g_tuner(file, fh, p);
1335 if (!ret) 1345 if (!ret)
1336 dbgarg (cmd, "index=%d, name=%s, type=%d, " 1346 dbgarg (cmd, "index=%d, name=%s, type=%d, "
@@ -1363,6 +1373,9 @@ static int __video_do_ioctl(struct inode *inode, struct file *file,
1363 struct v4l2_frequency *p=arg; 1373 struct v4l2_frequency *p=arg;
1364 if (!vfd->vidioc_g_frequency) 1374 if (!vfd->vidioc_g_frequency)
1365 break; 1375 break;
1376
1377 memset(p,0,sizeof(*p));
1378
1366 ret=vfd->vidioc_g_frequency(file, fh, p); 1379 ret=vfd->vidioc_g_frequency(file, fh, p);
1367 if (!ret) 1380 if (!ret)
1368 dbgarg (cmd, "tuner=%d, type=%d, frequency=%d\n", 1381 dbgarg (cmd, "tuner=%d, type=%d, frequency=%d\n",