Skip to content

Commit c3bd9a0

Browse files
javiercarrascocruzlag-linaro
authored andcommitted
mfd: rohm-bd9576: Constify read-only regmap structs
`bd957x_regmap`, `bd9576_irqs` and `bd9576_irq_chip` are not modified and can be declared as const to move its data to a read-only section. Signed-off-by: Javier Carrasco <[email protected]> Reviewed-by: Matti Vaittinen <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Lee Jones <[email protected]>
1 parent 9a17090 commit c3bd9a0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/mfd/rohm-bd9576.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,15 +57,15 @@ static const struct regmap_access_table volatile_regs = {
5757
.n_yes_ranges = ARRAY_SIZE(volatile_ranges),
5858
};
5959

60-
static struct regmap_config bd957x_regmap = {
60+
static const struct regmap_config bd957x_regmap = {
6161
.reg_bits = 8,
6262
.val_bits = 8,
6363
.volatile_table = &volatile_regs,
6464
.max_register = BD957X_MAX_REGISTER,
6565
.cache_type = REGCACHE_MAPLE,
6666
};
6767

68-
static struct regmap_irq bd9576_irqs[] = {
68+
static const struct regmap_irq bd9576_irqs[] = {
6969
REGMAP_IRQ_REG(BD9576_INT_THERM, 0, BD957X_MASK_INT_MAIN_THERM),
7070
REGMAP_IRQ_REG(BD9576_INT_OVP, 0, BD957X_MASK_INT_MAIN_OVP),
7171
REGMAP_IRQ_REG(BD9576_INT_SCP, 0, BD957X_MASK_INT_MAIN_SCP),
@@ -76,7 +76,7 @@ static struct regmap_irq bd9576_irqs[] = {
7676
REGMAP_IRQ_REG(BD9576_INT_SYS, 0, BD957X_MASK_INT_MAIN_SYS),
7777
};
7878

79-
static struct regmap_irq_chip bd9576_irq_chip = {
79+
static const struct regmap_irq_chip bd9576_irq_chip = {
8080
.name = "bd9576_irq",
8181
.irqs = &bd9576_irqs[0],
8282
.num_irqs = ARRAY_SIZE(bd9576_irqs),

0 commit comments

Comments
 (0)