Skip to content

Commit

Permalink
i2c: Constify i2c_algorithm declarations, part 1
Browse files Browse the repository at this point in the history
i2c: Constify i2c_algorithm declarations, part 1

Make struct i2c_algorithm declarations const in all i2c algorithm
drivers.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Jean Delvare authored and Greg Kroah-Hartman committed Sep 26, 2006
1 parent af71ff6 commit 9e11a9f
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion drivers/i2c/algos/i2c-algo-bit.c
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,7 @@ static u32 bit_func(struct i2c_adapter *adap)

/* -----exported algorithm data: ------------------------------------- */

static struct i2c_algorithm i2c_bit_algo = {
static const struct i2c_algorithm i2c_bit_algo = {
.master_xfer = bit_xfer,
.functionality = bit_func,
};
Expand Down
2 changes: 1 addition & 1 deletion drivers/i2c/algos/i2c-algo-pca.c
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ static int pca_init(struct i2c_algo_pca_data *adap)
return 0;
}

static struct i2c_algorithm pca_algo = {
static const struct i2c_algorithm pca_algo = {
.master_xfer = pca_xfer,
.functionality = pca_func,
};
Expand Down
2 changes: 1 addition & 1 deletion drivers/i2c/algos/i2c-algo-pcf.c
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@ static u32 pcf_func(struct i2c_adapter *adap)

/* -----exported algorithm data: ------------------------------------- */

static struct i2c_algorithm pcf_algo = {
static const struct i2c_algorithm pcf_algo = {
.master_xfer = pcf_xfer,
.functionality = pcf_func,
};
Expand Down
2 changes: 1 addition & 1 deletion drivers/i2c/algos/i2c-algo-sgi.c
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ static u32 sgi_func(struct i2c_adapter *adap)
return I2C_FUNC_SMBUS_EMUL;
}

static struct i2c_algorithm sgi_algo = {
static const struct i2c_algorithm sgi_algo = {
.master_xfer = sgi_xfer,
.functionality = sgi_func,
};
Expand Down

0 comments on commit 9e11a9f

Please sign in to comment.