Commit c5416d4b authored by Javier Carrasco's avatar Javier Carrasco Committed by Lee Jones

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: default avatarJavier Carrasco <javier.carrasco.cruz@gmail.com>
Link: https://lore.kernel.org/r/20240704-mfd-const-regmap_config-v2-1-0c8785b1331d@gmail.comSigned-off-by: default avatarLee Jones <lee@kernel.org>
parent 03bd3683
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
#define DA9062_IRQ_LOW 0 #define DA9062_IRQ_LOW 0
#define DA9062_IRQ_HIGH 1 #define DA9062_IRQ_HIGH 1
static struct regmap_irq da9061_irqs[] = { static const struct regmap_irq da9061_irqs[] = {
/* EVENT A */ /* EVENT A */
[DA9061_IRQ_ONKEY] = { [DA9061_IRQ_ONKEY] = {
.reg_offset = DA9062_REG_EVENT_A_OFFSET, .reg_offset = DA9062_REG_EVENT_A_OFFSET,
...@@ -79,7 +79,7 @@ static struct regmap_irq da9061_irqs[] = { ...@@ -79,7 +79,7 @@ static struct regmap_irq da9061_irqs[] = {
}, },
}; };
static struct regmap_irq_chip da9061_irq_chip = { static const struct regmap_irq_chip da9061_irq_chip = {
.name = "da9061-irq", .name = "da9061-irq",
.irqs = da9061_irqs, .irqs = da9061_irqs,
.num_irqs = DA9061_NUM_IRQ, .num_irqs = DA9061_NUM_IRQ,
...@@ -89,7 +89,7 @@ static struct regmap_irq_chip da9061_irq_chip = { ...@@ -89,7 +89,7 @@ static struct regmap_irq_chip da9061_irq_chip = {
.ack_base = DA9062AA_EVENT_A, .ack_base = DA9062AA_EVENT_A,
}; };
static struct regmap_irq da9062_irqs[] = { static const struct regmap_irq da9062_irqs[] = {
/* EVENT A */ /* EVENT A */
[DA9062_IRQ_ONKEY] = { [DA9062_IRQ_ONKEY] = {
.reg_offset = DA9062_REG_EVENT_A_OFFSET, .reg_offset = DA9062_REG_EVENT_A_OFFSET,
...@@ -151,7 +151,7 @@ static struct regmap_irq da9062_irqs[] = { ...@@ -151,7 +151,7 @@ static struct regmap_irq da9062_irqs[] = {
}, },
}; };
static struct regmap_irq_chip da9062_irq_chip = { static const struct regmap_irq_chip da9062_irq_chip = {
.name = "da9062-irq", .name = "da9062-irq",
.irqs = da9062_irqs, .irqs = da9062_irqs,
.num_irqs = DA9062_NUM_IRQ, .num_irqs = DA9062_NUM_IRQ,
...@@ -470,7 +470,7 @@ static const struct regmap_range_cfg da9061_range_cfg[] = { ...@@ -470,7 +470,7 @@ static const struct regmap_range_cfg da9061_range_cfg[] = {
} }
}; };
static struct regmap_config da9061_regmap_config = { static const struct regmap_config da9061_regmap_config = {
.reg_bits = 8, .reg_bits = 8,
.val_bits = 8, .val_bits = 8,
.ranges = da9061_range_cfg, .ranges = da9061_range_cfg,
...@@ -576,7 +576,7 @@ static const struct regmap_range_cfg da9062_range_cfg[] = { ...@@ -576,7 +576,7 @@ static const struct regmap_range_cfg da9062_range_cfg[] = {
} }
}; };
static struct regmap_config da9062_regmap_config = { static const struct regmap_config da9062_regmap_config = {
.reg_bits = 8, .reg_bits = 8,
.val_bits = 8, .val_bits = 8,
.ranges = da9062_range_cfg, .ranges = da9062_range_cfg,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment