Merge git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/v4l-dvb
[pandora-kernel.git] / drivers / media / video / saa5246a.c
index ad02329..03e7721 100644 (file)
@@ -66,6 +66,7 @@ static struct video_device saa_template;      /* Declared near bottom */
 
 /* Addresses to scan */
 static unsigned short normal_i2c[]      = { I2C_ADDRESS, I2C_CLIENT_END };
+
 I2C_CLIENT_INSMOD;
 
 static struct i2c_client client_template;
@@ -187,12 +188,14 @@ static int i2c_senddata(struct saa5246a_device *t, ...)
 {
        unsigned char buf[64];
        int v;
-       int ct=0;
+       int ct = 0;
        va_list argp;
-       va_start(argp,t);
+       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);
 }