[PATCH] Remove non-arch consumers of asm/segment.h
[powerpc.git] / drivers / media / video / v4l1-compat.c
index b0d4bcb..70ecbdb 100644 (file)
@@ -1,4 +1,6 @@
 /*
+ * $Id: v4l1-compat.c,v 1.9 2005/06/12 04:19:19 mchehab Exp $
+ *
  *     Video for Linux Two
  *     Backward Compatibility Layer
  *
  *
  */
 
-#ifndef __KERNEL__
-#define __KERNEL__
-#endif
-
 #include <linux/config.h>
 
 #include <linux/init.h>
 #include <linux/module.h>
+#include <linux/moduleparam.h>
 #include <linux/types.h>
 #include <linux/kernel.h>
 #include <linux/sched.h>
@@ -787,12 +786,15 @@ v4l_compat_translate_ioctl(struct inode         *inode,
                    !(qctrl2.flags & V4L2_CTRL_FLAG_DISABLED))
                        aud->step = qctrl2.step;
                aud->mode = 0;
+
+               memset(&tun2,0,sizeof(tun2));
                err = drv(inode, file, VIDIOC_G_TUNER, &tun2);
                if (err < 0) {
                        dprintk("VIDIOCGAUDIO / VIDIOC_G_TUNER: %d\n",err);
                        err = 0;
                        break;
                }
+
                if (tun2.rxsubchans & V4L2_TUNER_SUB_LANG2)
                        aud->mode = VIDEO_SOUND_LANG1 | VIDEO_SOUND_LANG2;
                else if (tun2.rxsubchans & V4L2_TUNER_SUB_STEREO)