diff options
-rw-r--r-- | drivers/media/video/videodev.c | 13 |
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", |