i2c: designware: Constify read-only struct regmap_config
authorJavier Carrasco <javier.carrasco.cruz@gmail.com>
Fri, 5 Jul 2024 18:06:25 +0000 (20:06 +0200)
committerAndi Shyti <andi.shyti@kernel.org>
Mon, 8 Jul 2024 22:56:44 +0000 (00:56 +0200)
`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>
drivers/i2c/busses/i2c-designware-platdrv.c

index 29aac9c873684a8ab3d254ff4060cef6e610af62..df3dc1e8093e365848603f51b5ff8124148ade42 100644 (file)
@@ -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,