summaryrefslogtreecommitdiff
path: root/drivers/net/can/sja1000/peak_pci.c
diff options
context:
space:
mode:
authorNishka Dasgupta <nishkadg.linux@gmail.com>2019-08-19 13:30:18 +0530
committerMarc Kleine-Budde <mkl@pengutronix.de>2019-08-20 13:41:25 +0200
commit1f0dee39e3cb272c32bb878d0a78d91300326d2b (patch)
treee88b6bfc095008e96b1c4906fb4754faf4e323ae /drivers/net/can/sja1000/peak_pci.c
parent30cc0ed73e3390af7c5573b159826e8162f09fe7 (diff)
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: Nishka Dasgupta <nishkadg.linux@gmail.com> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'drivers/net/can/sja1000/peak_pci.c')
-rw-r--r--drivers/net/can/sja1000/peak_pci.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/can/sja1000/peak_pci.c b/drivers/net/can/sja1000/peak_pci.c
index 68366d57916c..8c0244f51059 100644
--- a/drivers/net/can/sja1000/peak_pci.c
+++ b/drivers/net/can/sja1000/peak_pci.c
@@ -417,7 +417,7 @@ static void peak_pciec_write_reg(const struct sja1000_priv *priv,
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,
.setscl = pita_setscl,
.getsda = pita_getsda,