]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
V4L/DVB (6081): ivtv: Fix static structure initialization
authorJean Delvare <khali@linux-fr.org>
Thu, 23 Aug 2007 18:45:41 +0000 (15:45 -0300)
committerMauro Carvalho Chehab <mchehab@infradead.org>
Wed, 10 Oct 2007 01:06:24 +0000 (22:06 -0300)
Convert the initialization of ivtv_i2c_algo_template to C99-style.
Otherwise a future change to struct i2c_algo_bit_data would break
this code.

Also declared that structure const - it's a template after all.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
drivers/media/video/ivtv/ivtv-i2c.c

index 5e12ebc2a9deea4de122a97d2e709a808393fd8b..085dc3938da79107286bf73feec1cfd18c92e08b 100644 (file)
@@ -536,14 +536,13 @@ static struct i2c_adapter ivtv_i2c_adap_template = {
 #endif
 };
 
-static struct i2c_algo_bit_data ivtv_i2c_algo_template = {
-       NULL,                   /* ?? */
-       ivtv_setsda_old,        /* setsda function */
-       ivtv_setscl_old,        /* " */
-       ivtv_getsda_old,        /* " */
-       ivtv_getscl_old,        /* " */
-       10,                     /* udelay */
-       200                     /* timeout */
+static const struct i2c_algo_bit_data ivtv_i2c_algo_template = {
+       .setsda         = ivtv_setsda_old,
+       .setscl         = ivtv_setscl_old,
+       .getsda         = ivtv_getsda_old,
+       .getscl         = ivtv_getscl_old,
+       .udelay         = 10,
+       .timeout        = 200,
 };
 
 static struct i2c_client ivtv_i2c_client_template = {