提交 aeb292d1 编写于 作者: J Jean Delvare 提交者: Mauro Carvalho Chehab

V4L/DVB (6081): ivtv: Fix static structure initialization

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: NJean Delvare <khali@linux-fr.org>
Signed-off-by: NHans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: NMauro Carvalho Chehab <mchehab@infradead.org>
上级 9c12224a
......@@ -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 = {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册