Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mfd: tps65910: Constify struct regmap_irq_chip

`tps65910_irq_chip` and `tps65911_irq_chip` are not modified and can be
declared as const to move their data to a read-only section.

The pointer used to reference those structs has also been converted to
const.

Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
Link: https://lore.kernel.org/r/20240704-mfd-const-regmap_config-v2-19-0c8785b1331d@gmail.com
Signed-off-by: Lee Jones <lee@kernel.org>

authored by

Javier Carrasco and committed by
Lee Jones
9544cc65 36b6675f

+3 -3
+3 -3
drivers/mfd/tps65910.c
··· 197 197 }, 198 198 }; 199 199 200 - static struct regmap_irq_chip tps65911_irq_chip = { 200 + static const struct regmap_irq_chip tps65911_irq_chip = { 201 201 .name = "tps65910", 202 202 .irqs = tps65911_irqs, 203 203 .num_irqs = ARRAY_SIZE(tps65911_irqs), ··· 208 208 .ack_base = TPS65910_INT_STS, 209 209 }; 210 210 211 - static struct regmap_irq_chip tps65910_irq_chip = { 211 + static const struct regmap_irq_chip tps65910_irq_chip = { 212 212 .name = "tps65910", 213 213 .irqs = tps65910_irqs, 214 214 .num_irqs = ARRAY_SIZE(tps65910_irqs), ··· 223 223 struct tps65910_platform_data *pdata) 224 224 { 225 225 int ret; 226 - static struct regmap_irq_chip *tps6591x_irqs_chip; 226 + static const struct regmap_irq_chip *tps6591x_irqs_chip; 227 227 228 228 if (!irq) { 229 229 dev_warn(tps65910->dev, "No interrupt support, no core IRQ\n");