Message ID | 20240705-i2c-designware-platdrv-const-regmap_config-v1-1-8c82cc63df15@gmail.com |
---|---|
State | New |
Headers | show |
Series | i2c: designware: Constify read-only struct regmap_config | expand |
Hi On Fri, 05 Jul 2024 20:06:25 +0200, Javier Carrasco wrote: > `bt1_i2c_cfg` is not modified and can be declared as const to > move its data to a read-only section. > > Applied to i2c/i2c-host on git://git.kernel.org/pub/scm/linux/kernel/git/local tree Thank you, Andi Patches applied =============== [1/1] i2c: designware: Constify read-only struct regmap_config commit: 21ac0359f72a90b16bb0e2f9e6b40dbac54c4e31
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,
`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> --- drivers/i2c/busses/i2c-designware-platdrv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- base-commit: 0b58e108042b0ed28a71cd7edf5175999955b233 change-id: 20240705-i2c-designware-platdrv-const-regmap_config-5bc7aa35f320 Best regards,