summaryrefslogtreecommitdiffstats
path: root/drivers/i2c/busses/i2c-stm32f4.c
diff options
context:
space:
mode:
authorGustavo A. R. Silva <garsilva@embeddedor.com>2017-07-09 22:57:44 +0200
committerWolfram Sang <wsa@the-dreams.de>2017-08-12 13:25:17 +0200
commit8dc0f8c73c54c9d1a7fe8188ef3e70123a960eaf (patch)
treeac612d01c7017ac87b200576fa4d005d1363a24c /drivers/i2c/busses/i2c-stm32f4.c
parenti2c: Convert to using %pOF instead of full_name (diff)
downloadlinux-8dc0f8c73c54c9d1a7fe8188ef3e70123a960eaf.tar.xz
linux-8dc0f8c73c54c9d1a7fe8188ef3e70123a960eaf.zip
i2c: constify internal structures
Check for i2c_algorithm and i2c_adapter_quirks structures that are only stored in the algo and quirks fields of an i2c_adapter structure correspondingly. These fields are declared const, so i2c_algorithm and i2c_adapter_quirks structures that have this property can be declared as const also. Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com> Acked-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> (for designware) Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Diffstat (limited to 'drivers/i2c/busses/i2c-stm32f4.c')
-rw-r--r--drivers/i2c/busses/i2c-stm32f4.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/i2c/busses/i2c-stm32f4.c b/drivers/i2c/busses/i2c-stm32f4.c
index f9dd7e86b861..9d6f1103314a 100644
--- a/drivers/i2c/busses/i2c-stm32f4.c
+++ b/drivers/i2c/busses/i2c-stm32f4.c
@@ -751,7 +751,7 @@ static u32 stm32f4_i2c_func(struct i2c_adapter *adap)
return I2C_FUNC_I2C | I2C_FUNC_SMBUS_EMUL;
}
-static struct i2c_algorithm stm32f4_i2c_algo = {
+static const struct i2c_algorithm stm32f4_i2c_algo = {
.master_xfer = stm32f4_i2c_xfer,
.functionality = stm32f4_i2c_func,
};