Commit 9e11a9fb authored by Jean Delvare's avatar Jean Delvare Committed by Greg Kroah-Hartman

i2c: Constify i2c_algorithm declarations, part 1

i2c: Constify i2c_algorithm declarations, part 1

Make struct i2c_algorithm declarations const in all i2c algorithm
drivers.
Signed-off-by: default avatarJean Delvare <khali@linux-fr.org>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent af71ff69
...@@ -512,7 +512,7 @@ static u32 bit_func(struct i2c_adapter *adap) ...@@ -512,7 +512,7 @@ static u32 bit_func(struct i2c_adapter *adap)
/* -----exported algorithm data: ------------------------------------- */ /* -----exported algorithm data: ------------------------------------- */
static struct i2c_algorithm i2c_bit_algo = { static const struct i2c_algorithm i2c_bit_algo = {
.master_xfer = bit_xfer, .master_xfer = bit_xfer,
.functionality = bit_func, .functionality = bit_func,
}; };
......
...@@ -355,7 +355,7 @@ static int pca_init(struct i2c_algo_pca_data *adap) ...@@ -355,7 +355,7 @@ static int pca_init(struct i2c_algo_pca_data *adap)
return 0; return 0;
} }
static struct i2c_algorithm pca_algo = { static const struct i2c_algorithm pca_algo = {
.master_xfer = pca_xfer, .master_xfer = pca_xfer,
.functionality = pca_func, .functionality = pca_func,
}; };
......
...@@ -458,7 +458,7 @@ static u32 pcf_func(struct i2c_adapter *adap) ...@@ -458,7 +458,7 @@ static u32 pcf_func(struct i2c_adapter *adap)
/* -----exported algorithm data: ------------------------------------- */ /* -----exported algorithm data: ------------------------------------- */
static struct i2c_algorithm pcf_algo = { static const struct i2c_algorithm pcf_algo = {
.master_xfer = pcf_xfer, .master_xfer = pcf_xfer,
.functionality = pcf_func, .functionality = pcf_func,
}; };
......
...@@ -157,7 +157,7 @@ static u32 sgi_func(struct i2c_adapter *adap) ...@@ -157,7 +157,7 @@ static u32 sgi_func(struct i2c_adapter *adap)
return I2C_FUNC_SMBUS_EMUL; return I2C_FUNC_SMBUS_EMUL;
} }
static struct i2c_algorithm sgi_algo = { static const struct i2c_algorithm sgi_algo = {
.master_xfer = sgi_xfer, .master_xfer = sgi_xfer,
.functionality = sgi_func, .functionality = sgi_func,
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment