diff options
Diffstat (limited to 'drivers/media/video')
-rw-r--r-- | drivers/media/video/saa5246a.c | 10 | ||||
-rw-r--r-- | drivers/media/video/saa5249.c | 8 |
2 files changed, 11 insertions, 7 deletions
diff --git a/drivers/media/video/saa5246a.c b/drivers/media/video/saa5246a.c index ad0232935df6..996b49491f5a 100644 --- a/drivers/media/video/saa5246a.c +++ b/drivers/media/video/saa5246a.c | |||
@@ -187,12 +187,14 @@ static int i2c_senddata(struct saa5246a_device *t, ...) | |||
187 | { | 187 | { |
188 | unsigned char buf[64]; | 188 | unsigned char buf[64]; |
189 | int v; | 189 | int v; |
190 | int ct=0; | 190 | int ct = 0; |
191 | va_list argp; | 191 | va_list argp; |
192 | va_start(argp,t); | 192 | va_start(argp, t); |
193 | 193 | ||
194 | while((v=va_arg(argp,int))!=-1) | 194 | while ((v = va_arg(argp, int)) != -1) |
195 | buf[ct++]=v; | 195 | buf[ct++] = v; |
196 | |||
197 | va_end(argp); | ||
196 | return i2c_sendbuf(t, buf[0], ct-1, buf+1); | 198 | return i2c_sendbuf(t, buf[0], ct-1, buf+1); |
197 | } | 199 | } |
198 | 200 | ||
diff --git a/drivers/media/video/saa5249.c b/drivers/media/video/saa5249.c index 94bb59a32b17..f55d6e85f20f 100644 --- a/drivers/media/video/saa5249.c +++ b/drivers/media/video/saa5249.c | |||
@@ -282,12 +282,14 @@ static int i2c_senddata(struct saa5249_device *t, ...) | |||
282 | { | 282 | { |
283 | unsigned char buf[64]; | 283 | unsigned char buf[64]; |
284 | int v; | 284 | int v; |
285 | int ct=0; | 285 | int ct = 0; |
286 | va_list argp; | 286 | va_list argp; |
287 | va_start(argp,t); | 287 | va_start(argp,t); |
288 | 288 | ||
289 | while((v=va_arg(argp,int))!=-1) | 289 | while ((v = va_arg(argp, int)) != -1) |
290 | buf[ct++]=v; | 290 | buf[ct++] = v; |
291 | |||
292 | va_end(argp); | ||
291 | return i2c_sendbuf(t, buf[0], ct-1, buf+1); | 293 | return i2c_sendbuf(t, buf[0], ct-1, buf+1); |
292 | } | 294 | } |
293 | 295 | ||