summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorJavier Carrasco <javier.carrasco.cruz@gmail.com>2024-07-05 20:06:25 +0200
committerAndi Shyti <andi.shyti@kernel.org>2024-07-09 00:56:44 +0200
commit21ac0359f72a90b16bb0e2f9e6b40dbac54c4e31 (patch)
treeecd26740a6574ff8c8da18e3f1c1a588155e2ceb /drivers
parentee1691d0ae103ba7fd9439800ef454674fadad27 (diff)
downloadlwn-21ac0359f72a90b16bb0e2f9e6b40dbac54c4e31.tar.gz
lwn-21ac0359f72a90b16bb0e2f9e6b40dbac54c4e31.zip
i2c: designware: Constify read-only struct regmap_config
`bt1_i2c_cfg` is not modified and can be declared as const to move its data to a read-only section. Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com> Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/i2c/busses/i2c-designware-platdrv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/i2c/busses/i2c-designware-platdrv.c b/drivers/i2c/busses/i2c-designware-platdrv.c
index 29aac9c87368..df3dc1e8093e 100644
--- a/drivers/i2c/busses/i2c-designware-platdrv.c
+++ b/drivers/i2c/busses/i2c-designware-platdrv.c
@@ -101,7 +101,7 @@ static int bt1_i2c_write(void *context, unsigned int reg, unsigned int val)
BT1_I2C_CTL_GO | BT1_I2C_CTL_WR | (reg & BT1_I2C_CTL_ADDR_MASK));
}
-static struct regmap_config bt1_i2c_cfg = {
+static const struct regmap_config bt1_i2c_cfg = {
.reg_bits = 32,
.val_bits = 32,
.reg_stride = 4,