Skip to content

Commit

Permalink
i2c: versatile: Make i2c_algo_bit_data const
Browse files Browse the repository at this point in the history
Make this const as it is only used in a copy operation.
Done using Coccinelle.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
  • Loading branch information
Bhumika Goyal authored and Wolfram Sang committed Aug 29, 2017
1 parent ae3923a commit a89c22d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/i2c/busses/i2c-versatile.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ static int i2c_versatile_getscl(void *data)
return !!(readl(i2c->base + I2C_CONTROL) & SCL);
}

static struct i2c_algo_bit_data i2c_versatile_algo = {
static const struct i2c_algo_bit_data i2c_versatile_algo = {
.setsda = i2c_versatile_setsda,
.setscl = i2c_versatile_setscl,
.getsda = i2c_versatile_getsda,
Expand Down

0 comments on commit a89c22d

Please sign in to comment.