Skip to content

Commit c5416d4

Browse files
javiercarrascocruzlag-linaro
authored andcommitted
mfd: da9062-core: Constify read-only regmap structs
`da9061_regmap_{config,irq,irq_chip}` and `da9062_{config,irq,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 03bd368 commit c5416d4

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

drivers/mfd/da9062-core.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
#define DA9062_IRQ_LOW 0
2626
#define DA9062_IRQ_HIGH 1
2727

28-
static struct regmap_irq da9061_irqs[] = {
28+
static const struct regmap_irq da9061_irqs[] = {
2929
/* EVENT A */
3030
[DA9061_IRQ_ONKEY] = {
3131
.reg_offset = DA9062_REG_EVENT_A_OFFSET,
@@ -79,7 +79,7 @@ static struct regmap_irq da9061_irqs[] = {
7979
},
8080
};
8181

82-
static struct regmap_irq_chip da9061_irq_chip = {
82+
static const struct regmap_irq_chip da9061_irq_chip = {
8383
.name = "da9061-irq",
8484
.irqs = da9061_irqs,
8585
.num_irqs = DA9061_NUM_IRQ,
@@ -89,7 +89,7 @@ static struct regmap_irq_chip da9061_irq_chip = {
8989
.ack_base = DA9062AA_EVENT_A,
9090
};
9191

92-
static struct regmap_irq da9062_irqs[] = {
92+
static const struct regmap_irq da9062_irqs[] = {
9393
/* EVENT A */
9494
[DA9062_IRQ_ONKEY] = {
9595
.reg_offset = DA9062_REG_EVENT_A_OFFSET,
@@ -151,7 +151,7 @@ static struct regmap_irq da9062_irqs[] = {
151151
},
152152
};
153153

154-
static struct regmap_irq_chip da9062_irq_chip = {
154+
static const struct regmap_irq_chip da9062_irq_chip = {
155155
.name = "da9062-irq",
156156
.irqs = da9062_irqs,
157157
.num_irqs = DA9062_NUM_IRQ,
@@ -470,7 +470,7 @@ static const struct regmap_range_cfg da9061_range_cfg[] = {
470470
}
471471
};
472472

473-
static struct regmap_config da9061_regmap_config = {
473+
static const struct regmap_config da9061_regmap_config = {
474474
.reg_bits = 8,
475475
.val_bits = 8,
476476
.ranges = da9061_range_cfg,
@@ -576,7 +576,7 @@ static const struct regmap_range_cfg da9062_range_cfg[] = {
576576
}
577577
};
578578

579-
static struct regmap_config da9062_regmap_config = {
579+
static const struct regmap_config da9062_regmap_config = {
580580
.reg_bits = 8,
581581
.val_bits = 8,
582582
.ranges = da9062_range_cfg,

0 commit comments

Comments
 (0)