summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/ivtv/ivtv-i2c.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2007-08-23 15:45:41 -0300
committerMauro Carvalho Chehab <mchehab@infradead.org>2007-08-23 15:45:41 -0300
commit1030c2906b27843297261f98cbe2682635312eb9 (patch)
tree177982abff171a253c7116b3ded92867cbf312f5 /linux/drivers/media/video/ivtv/ivtv-i2c.c
parentb88250e629c44cabcc1d8d725b9fee188e0ab13d (diff)
downloadmediapointer-dvb-s2-1030c2906b27843297261f98cbe2682635312eb9.tar.gz
mediapointer-dvb-s2-1030c2906b27843297261f98cbe2682635312eb9.tar.bz2
From: Jean Delvare <khali@linux-fr.org>
Subject: ivtv: Fix static structure initialization Date: Thu, 23 Aug 2007 19:32:26 +0200 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>
Diffstat (limited to 'linux/drivers/media/video/ivtv/ivtv-i2c.c')
-rw-r--r--linux/drivers/media/video/ivtv/ivtv-i2c.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/linux/drivers/media/video/ivtv/ivtv-i2c.c b/linux/drivers/media/video/ivtv/ivtv-i2c.c
index 624650520..c24975b6e 100644
--- a/linux/drivers/media/video/ivtv/ivtv-i2c.c
+++ b/linux/drivers/media/video/ivtv/ivtv-i2c.c
@@ -536,17 +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 */
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 18)
- 10,
-#endif
- 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 = {