Skip to content

Commit 36b6675

Browse files
javiercarrascocruzlag-linaro
authored andcommitted
mfd: tps65219: Constify read-only regmap structs
`tps65219_irqs` and `tps65219_irq_chip` are not modified and can be declared as const to move their data to a read-only section. Signed-off-by: Javier Carrasco <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Lee Jones <[email protected]>
1 parent 687d1a4 commit 36b6675

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/mfd/tps65219.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ static struct regmap_irq_sub_irq_map tps65219_sub_irq_offsets[] = {
159159
#define TPS65219_REGMAP_IRQ_REG(int_name, register_position) \
160160
REGMAP_IRQ_REG(int_name, register_position, int_name##_MASK)
161161

162-
static struct regmap_irq tps65219_irqs[] = {
162+
static const struct regmap_irq tps65219_irqs[] = {
163163
TPS65219_REGMAP_IRQ_REG(TPS65219_INT_LDO3_SCG, TPS65219_REG_INT_LDO_3_4_POS),
164164
TPS65219_REGMAP_IRQ_REG(TPS65219_INT_LDO3_OC, TPS65219_REG_INT_LDO_3_4_POS),
165165
TPS65219_REGMAP_IRQ_REG(TPS65219_INT_LDO3_UV, TPS65219_REG_INT_LDO_3_4_POS),
@@ -211,7 +211,7 @@ static struct regmap_irq tps65219_irqs[] = {
211211
TPS65219_REGMAP_IRQ_REG(TPS65219_INT_PB_RISING_EDGE_DETECT, TPS65219_REG_INT_PB_POS),
212212
};
213213

214-
static struct regmap_irq_chip tps65219_irq_chip = {
214+
static const struct regmap_irq_chip tps65219_irq_chip = {
215215
.name = "tps65219_irq",
216216
.main_status = TPS65219_REG_INT_SOURCE,
217217
.num_main_regs = 1,

0 commit comments

Comments
 (0)