Commit 1f0dee39 authored by Nishka Dasgupta's avatar Nishka Dasgupta Committed by Marc Kleine-Budde

can: peak_pci: Make structure peak_pciec_i2c_bit_ops constant

Static structure peak_pciec_i2c_bit_ops, of type i2c_algo_bit_data, is
not used except to be copied into another variable. Hence make it const
to protect it from modification.

Issue found with Coccinelle.
Signed-off-by: default avatarNishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
parent 30cc0ed7
...@@ -417,7 +417,7 @@ static void peak_pciec_write_reg(const struct sja1000_priv *priv, ...@@ -417,7 +417,7 @@ static void peak_pciec_write_reg(const struct sja1000_priv *priv,
peak_pci_write_reg(priv, port, val); peak_pci_write_reg(priv, port, val);
} }
static struct i2c_algo_bit_data peak_pciec_i2c_bit_ops = { static const struct i2c_algo_bit_data peak_pciec_i2c_bit_ops = {
.setsda = pita_setsda, .setsda = pita_setsda,
.setscl = pita_setscl, .setscl = pita_setscl,
.getsda = pita_getsda, .getsda = pita_getsda,
......
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