aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/v4l1-compat.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2006-11-20 10:06:54 -0500
committerMauro Carvalho Chehab <mchehab@infradead.org>2006-12-10 06:04:57 -0500
commitc6aeb11127a8a4266d613563f737a1d60cfae628 (patch)
tree2c3c11747d778a258396fdcc03438aaca409ebd2 /drivers/media/video/v4l1-compat.c
parent61cebe9db7992c2c6ccb91f179f56008e74c2de1 (diff)
V4L/DVB (4857): Cleans some ioctl structs before calling V4L2 counterpart
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/v4l1-compat.c')
-rw-r--r--drivers/media/video/v4l1-compat.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/media/video/v4l1-compat.c b/drivers/media/video/v4l1-compat.c
index 1d899e2db394..06221a0c38aa 100644
--- a/drivers/media/video/v4l1-compat.c
+++ b/drivers/media/video/v4l1-compat.c
@@ -714,6 +714,7 @@ v4l_compat_translate_ioctl(struct inode *inode,
714 case VIDIOCGFREQ: /* get frequency */ 714 case VIDIOCGFREQ: /* get frequency */
715 { 715 {
716 unsigned long *freq = arg; 716 unsigned long *freq = arg;
717 memset(&freq2,0,sizeof(freq2));
717 718
718 freq2.tuner = 0; 719 freq2.tuner = 0;
719 err = drv(inode, file, VIDIOC_G_FREQUENCY, &freq2); 720 err = drv(inode, file, VIDIOC_G_FREQUENCY, &freq2);
@@ -726,8 +727,8 @@ v4l_compat_translate_ioctl(struct inode *inode,
726 case VIDIOCSFREQ: /* set frequency */ 727 case VIDIOCSFREQ: /* set frequency */
727 { 728 {
728 unsigned long *freq = arg; 729 unsigned long *freq = arg;
730 memset(&freq2,0,sizeof(freq2));
729 731
730 freq2.tuner = 0;
731 drv(inode, file, VIDIOC_G_FREQUENCY, &freq2); 732 drv(inode, file, VIDIOC_G_FREQUENCY, &freq2);
732 freq2.frequency = *freq; 733 freq2.frequency = *freq;
733 err = drv(inode, file, VIDIOC_S_FREQUENCY, &freq2); 734 err = drv(inode, file, VIDIOC_S_FREQUENCY, &freq2);
@@ -738,6 +739,7 @@ v4l_compat_translate_ioctl(struct inode *inode,
738 case VIDIOCGAUDIO: /* get audio properties/controls */ 739 case VIDIOCGAUDIO: /* get audio properties/controls */
739 { 740 {
740 struct video_audio *aud = arg; 741 struct video_audio *aud = arg;
742 memset(&aud2,0,sizeof(aud2));
741 743
742 err = drv(inode, file, VIDIOC_G_AUDIO, &aud2); 744 err = drv(inode, file, VIDIOC_G_AUDIO, &aud2);
743 if (err < 0) { 745 if (err < 0) {
@@ -898,6 +900,7 @@ v4l_compat_translate_ioctl(struct inode *inode,
898 { 900 {
899 int *i = arg; 901 int *i = arg;
900 902
903 memset(&buf2,0,sizeof(buf2));
901 buf2.index = *i; 904 buf2.index = *i;
902 buf2.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; 905 buf2.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
903 err = drv(inode, file, VIDIOC_QUERYBUF, &buf2); 906 err = drv(inode, file, VIDIOC_QUERYBUF, &buf2);