提交 ad3caf8a 编写于 作者: B Bhumika Goyal 提交者: Wolfram Sang

i2c: busses: make i2c_algorithm const

Make these const as they are only stored in the algo field of
i2c_adapter structure, which is const.
Signed-off-by: NBhumika Goyal <bhumirks@gmail.com>
Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
上级 8b9ec071
...@@ -590,7 +590,7 @@ static u32 i2c_pnx_func(struct i2c_adapter *adapter) ...@@ -590,7 +590,7 @@ static u32 i2c_pnx_func(struct i2c_adapter *adapter)
return I2C_FUNC_I2C | I2C_FUNC_SMBUS_EMUL; return I2C_FUNC_I2C | I2C_FUNC_SMBUS_EMUL;
} }
static struct i2c_algorithm pnx_algorithm = { static const struct i2c_algorithm pnx_algorithm = {
.master_xfer = i2c_pnx_xfer, .master_xfer = i2c_pnx_xfer,
.functionality = i2c_pnx_func, .functionality = i2c_pnx_func,
}; };
......
...@@ -175,7 +175,7 @@ static u32 puv3_i2c_func(struct i2c_adapter *adapter) ...@@ -175,7 +175,7 @@ static u32 puv3_i2c_func(struct i2c_adapter *adapter)
return I2C_FUNC_I2C | I2C_FUNC_SMBUS_EMUL; return I2C_FUNC_I2C | I2C_FUNC_SMBUS_EMUL;
} }
static struct i2c_algorithm puv3_i2c_algorithm = { static const struct i2c_algorithm puv3_i2c_algorithm = {
.master_xfer = puv3_i2c_xfer, .master_xfer = puv3_i2c_xfer,
.functionality = puv3_i2c_func, .functionality = puv3_i2c_func,
}; };
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册