I2C: Fix some i2c algorithm initialization
PATCH 1/1 I2C: Fix some i2c algorithm initialization
Hi Greg,
While searching for i2c_algorithm declarations missing their .functionality member, I found three of them which were not properly initialized. i2c-algo-ite and i2c_sibyte_algo do not use the C99 initialization syntax, and i2c-ibm_iic.c explicitely initializes NULL members. Following patch puts some order in there.
Please apply, thanks.
drivers/i2c/algos/i2c-algo-ite.c renamed from drivers/i2c/algos/i2c-algo-ite.c.orig +5 -8
@@ -713,14 +713,11 @@/* -----exported algorithm data: ------------------------------------- */ static struct i2c_algorithm iic_algo = { -"ITE IIC algorithm" , -I2C_ALGO_IIC , - iic_xfer,/* master_xfer */ -NULL ,/* smbus_xfer */ -NULL ,/* slave_xmit */ -NULL ,/* slave_recv */ - algo_control,/* ioctl */ - iic_func,/* functionality */ + .name ="ITE IIC algorithm" , + .id =I2C_ALGO_IIC , + .master_xfer = iic_xfer, + .algo_control = algo_control,/* ioctl */ + .functionality = iic_func, };
drivers/i2c/algos/i2c-algo-sibyte.c renamed from drivers/i2c/algos/i2c-algo-sibyte.c.orig +5 -8
@@ -136,14 +136,11 @@/* -----exported algorithm data: ------------------------------------- */ static struct i2c_algorithm i2c_sibyte_algo = { -"SiByte algorithm" , -I2C_ALGO_SIBYTE , -NULL ,/* master_xfer */ - smbus_xfer,/* smbus_xfer */ -NULL ,/* slave_xmit */ -NULL ,/* slave_recv */ - algo_control,/* ioctl */ - bit_func,/* functionality */ + .name ="SiByte algorithm" , + .id =I2C_ALGO_SIBYTE , + .smbus_xfer = smbus_xfer, + .algo_control = algo_control,/* ioctl */ + .functionality = bit_func, };/*
drivers/i2c/busses/i2c-ibm_iic.c renamed from drivers/i2c/busses/i2c-ibm_iic.c.orig +0 -4
@@ -630,10 +630,6 @@ .name = "IBM IIC algorithm", .id = I2C_ALGO_OCP, .master_xfer = iic_xfer, - .smbus_xfer = NULL, - .slave_send = NULL, - .slave_recv = NULL, - .algo_control = NULL, .functionality = iic_func };
Signature · 1 line
Jean Delvare
Greg KH
AppliedPATCH 1/1 I2C: Fix some i2c algorithm initialization
Quoted 9 lines · Jean Delvare
Hi Greg,
While searching for
i2c_algorithmdeclarations missing their .functionality member, I found three of them which were not properly initialized. i2c-algo-ite andi2c_sibyte_algodo not use the C99 initialization syntax, andi2c-ibm_iic.cexplicitely initializes NULL members. Following patch puts some order in there.Please apply, thanks.
Applied, thanks.
greg k-h