aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/i2c
diff options
context:
space:
mode:
authorNishka Dasgupta <nishkadg.linux@gmail.com>2019-08-15 11:25:50 +0530
committerWolfram Sang <wsa@the-dreams.de>2019-08-30 15:01:12 +0200
commit67a53081e655d41a77f510377364600e5e9bf89c (patch)
treeed600ae1e85b271cfe8dc96c0e66d7c904bbdcd1 /drivers/i2c
parenti2c: iproc: Add full name of devicetree node to adapter name (diff)
downloadlinux-dev-67a53081e655d41a77f510377364600e5e9bf89c.tar.xz
linux-dev-67a53081e655d41a77f510377364600e5e9bf89c.zip
i2c: iproc: Make bcm_iproc_i2c_quirks constant
Static structure bcm_iproc_i2c_quirks, of type i2c_adapter_quirks, is only used when being assigned to constant field quirks of a variable having type i2c_adapter. Hence make bcm_iproc_i2c_quirks constant as well to prevent it from unintended modification. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com> Reviewed-by: Ray Jui <ray.jui@broadcom.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Diffstat (limited to 'drivers/i2c')
-rw-r--r--drivers/i2c/busses/i2c-bcm-iproc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/i2c/busses/i2c-bcm-iproc.c b/drivers/i2c/busses/i2c-bcm-iproc.c
index ee5578173fb1..24269a5e3af6 100644
--- a/drivers/i2c/busses/i2c-bcm-iproc.c
+++ b/drivers/i2c/busses/i2c-bcm-iproc.c
@@ -803,7 +803,7 @@ static struct i2c_algorithm bcm_iproc_algo = {
.unreg_slave = bcm_iproc_i2c_unreg_slave,
};
-static struct i2c_adapter_quirks bcm_iproc_i2c_quirks = {
+static const struct i2c_adapter_quirks bcm_iproc_i2c_quirks = {
.max_read_len = M_RX_MAX_READ_LEN,
};