V4L/DVB (8103): videodev: fix/improve ioctl debugging
[pandora-kernel.git] / drivers / media / video / saa5249.c
index 17f1e2e..ec8c65d 100644 (file)
@@ -282,19 +282,21 @@ static int i2c_senddata(struct saa5249_device *t, ...)
 {
        unsigned char buf[64];
        int v;
-       int ct=0;
+       int ct = 0;
        va_list argp;
        va_start(argp,t);
 
-       while((v=va_arg(argp,int))!=-1)
-               buf[ct++]=v;
+       while ((v = va_arg(argp, int)) != -1)
+               buf[ct++] = v;
+
+       va_end(argp);
        return i2c_sendbuf(t, buf[0], ct-1, buf+1);
 }
 
-/* Get count number of bytes from I²C-device at address adr, store them in buf. Start & stop
+/* Get count number of bytes from I²C-device at address adr, store them in buf. Start & stop
  * handshaking is done by this routine, ack will be sent after the last byte to inhibit further
  * sending of data. If uaccess is 'true', data is written to user-space with put_user.
- * Returns -1 if I²C-device didn't send acknowledge, 0 otherwise
+ * Returns -1 if I²C-device didn't send acknowledge, 0 otherwise
  */
 
 static int i2c_getdata(struct saa5249_device *t, int count, u8 *buf)
@@ -699,7 +701,9 @@ static const struct file_operations saa_fops = {
        .open           = saa5249_open,
        .release        = saa5249_release,
        .ioctl          = saa5249_ioctl,
+#ifdef CONFIG_COMPAT
        .compat_ioctl   = v4l_compat_ioctl32,
+#endif
        .llseek         = no_llseek,
 };