summaryrefslogtreecommitdiffstats
path: root/drivers/i2c/busses/i2c-synquacer.c
diff options
context:
space:
mode:
authorNishka Dasgupta <nishkadg.linux@gmail.com>2019-08-19 09:58:54 +0200
committerWolfram Sang <wsa@the-dreams.de>2019-09-03 20:17:27 +0200
commit7077ad2ee316551b4ba9602838d09b67683e20b6 (patch)
tree881b1127f21566eac36cc87cbf0eac9d446ff0f8 /drivers/i2c/busses/i2c-synquacer.c
parenti2c: hix5hd2: Remove IRQF_ONESHOT (diff)
downloadlinux-7077ad2ee316551b4ba9602838d09b67683e20b6.tar.xz
linux-7077ad2ee316551b4ba9602838d09b67683e20b6.zip
i2c: synquacer: Make synquacer_i2c_ops constant
Static structure synquacer_i2c_ops, of type i2c_adapter, is only used when it is copied into a field of another structure. It is not itself modified. Hence make it const to protect it from unintended modification. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com> Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Diffstat (limited to 'drivers/i2c/busses/i2c-synquacer.c')
-rw-r--r--drivers/i2c/busses/i2c-synquacer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/i2c/busses/i2c-synquacer.c b/drivers/i2c/busses/i2c-synquacer.c
index f724c8e6b360..39762f0611b1 100644
--- a/drivers/i2c/busses/i2c-synquacer.c
+++ b/drivers/i2c/busses/i2c-synquacer.c
@@ -526,7 +526,7 @@ static const struct i2c_algorithm synquacer_i2c_algo = {
.functionality = synquacer_i2c_functionality,
};
-static struct i2c_adapter synquacer_i2c_ops = {
+static const struct i2c_adapter synquacer_i2c_ops = {
.owner = THIS_MODULE,
.name = "synquacer_i2c-adapter",
.algo = &synquacer_i2c_algo,