Skip to content

Commit 7ce7b26

Browse files
krzkLee Jones
authored andcommitted
mfd: Constify regmap and irq configuration data
Constify in various drivers configuration data which is not modified: - regmap_irq_chip, - individual regmap_irq's in array, - regmap_config, - irq_domain_ops, Signed-off-by: Krzysztof Kozlowski <k.kozlowski.k@gmail.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
1 parent 79aa793 commit 7ce7b26

22 files changed

Lines changed: 29 additions & 29 deletions

‎drivers/mfd/88pm860x-core.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -566,7 +566,7 @@ static int pm860x_irq_domain_map(struct irq_domain *d, unsigned int virq,
566566
return 0;
567567
}
568568

569-
static struct irq_domain_ops pm860x_irq_domain_ops = {
569+
static const struct irq_domain_ops pm860x_irq_domain_ops = {
570570
.map = pm860x_irq_domain_map,
571571
.xlate = irq_domain_xlate_onetwocell,
572572
};

‎drivers/mfd/ab8500-core.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -574,7 +574,7 @@ static int ab8500_irq_map(struct irq_domain *d, unsigned int virq,
574574
return 0;
575575
}
576576

577-
static struct irq_domain_ops ab8500_irq_ops = {
577+
static const struct irq_domain_ops ab8500_irq_ops = {
578578
.map = ab8500_irq_map,
579579
.xlate = irq_domain_xlate_twocell,
580580
};

‎drivers/mfd/arizona-irq.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ static int arizona_irq_map(struct irq_domain *h, unsigned int virq,
186186
return 0;
187187
}
188188

189-
static struct irq_domain_ops arizona_domain_ops = {
189+
static const struct irq_domain_ops arizona_domain_ops = {
190190
.map = arizona_irq_map,
191191
.xlate = irq_domain_xlate_twocell,
192192
};

‎drivers/mfd/da9052-irq.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
#define DA9052_IRQ_MASK_POS_7 0x40
3636
#define DA9052_IRQ_MASK_POS_8 0x80
3737

38-
static struct regmap_irq da9052_irqs[] = {
38+
static const struct regmap_irq da9052_irqs[] = {
3939
[DA9052_IRQ_DCIN] = {
4040
.reg_offset = 0,
4141
.mask = DA9052_IRQ_MASK_POS_1,
@@ -166,7 +166,7 @@ static struct regmap_irq da9052_irqs[] = {
166166
},
167167
};
168168

169-
static struct regmap_irq_chip da9052_regmap_irq_chip = {
169+
static const struct regmap_irq_chip da9052_regmap_irq_chip = {
170170
.name = "da9052_irq",
171171
.status_base = DA9052_EVENT_A_REG,
172172
.mask_base = DA9052_IRQ_MASK_A_REG,

‎drivers/mfd/da9055-core.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ static bool da9055_register_volatile(struct device *dev, unsigned int reg)
222222
}
223223
}
224224

225-
static struct regmap_irq da9055_irqs[] = {
225+
static const struct regmap_irq da9055_irqs[] = {
226226
[DA9055_IRQ_NONKEY] = {
227227
.reg_offset = 0,
228228
.mask = DA9055_IRQ_NONKEY_MASK,
@@ -245,7 +245,7 @@ static struct regmap_irq da9055_irqs[] = {
245245
},
246246
};
247247

248-
struct regmap_config da9055_regmap_config = {
248+
const struct regmap_config da9055_regmap_config = {
249249
.reg_bits = 8,
250250
.val_bits = 8,
251251

@@ -367,7 +367,7 @@ static const struct mfd_cell da9055_devs[] = {
367367
},
368368
};
369369

370-
static struct regmap_irq_chip da9055_regmap_irq_chip = {
370+
static const struct regmap_irq_chip da9055_regmap_irq_chip = {
371371
.name = "da9055_irq",
372372
.status_base = DA9055_REG_EVENT_A,
373373
.mask_base = DA9055_REG_IRQ_MASK_A,

‎drivers/mfd/da9063-irq.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ struct da9063_irq_data {
3434
u8 mask;
3535
};
3636

37-
static struct regmap_irq da9063_irqs[] = {
37+
static const struct regmap_irq da9063_irqs[] = {
3838
/* DA9063 event A register */
3939
[DA9063_IRQ_ONKEY] = {
4040
.reg_offset = DA9063_REG_EVENT_A_OFFSET,
@@ -153,7 +153,7 @@ static struct regmap_irq da9063_irqs[] = {
153153
},
154154
};
155155

156-
static struct regmap_irq_chip da9063_irq_chip = {
156+
static const struct regmap_irq_chip da9063_irq_chip = {
157157
.name = "da9063-irq",
158158
.irqs = da9063_irqs,
159159
.num_irqs = DA9063_NUM_IRQ,

‎drivers/mfd/da9150-core.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ void da9150_bulk_write(struct da9150 *da9150, u16 reg, int count, const u8 *buf)
164164
}
165165
EXPORT_SYMBOL_GPL(da9150_bulk_write);
166166

167-
static struct regmap_irq da9150_irqs[] = {
167+
static const struct regmap_irq da9150_irqs[] = {
168168
[DA9150_IRQ_VBUS] = {
169169
.reg_offset = 0,
170170
.mask = DA9150_E_VBUS_MASK,
@@ -251,7 +251,7 @@ static struct regmap_irq da9150_irqs[] = {
251251
},
252252
};
253253

254-
static struct regmap_irq_chip da9150_regmap_irq_chip = {
254+
static const struct regmap_irq_chip da9150_regmap_irq_chip = {
255255
.name = "da9150_irq",
256256
.status_base = DA9150_EVENT_E,
257257
.mask_base = DA9150_IRQ_MASK_E,

‎drivers/mfd/db8500-prcmu.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2659,7 +2659,7 @@ static int db8500_irq_map(struct irq_domain *d, unsigned int virq,
26592659
return 0;
26602660
}
26612661

2662-
static struct irq_domain_ops db8500_irq_ops = {
2662+
static const struct irq_domain_ops db8500_irq_ops = {
26632663
.map = db8500_irq_map,
26642664
.xlate = irq_domain_xlate_twocell,
26652665
};

‎drivers/mfd/intel_soc_pmic_core.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ struct intel_soc_pmic_config {
2424
struct mfd_cell *cell_dev;
2525
int n_cell_devs;
2626
const struct regmap_config *regmap_config;
27-
struct regmap_irq_chip *irq_chip;
27+
const struct regmap_irq_chip *irq_chip;
2828
};
2929

3030
extern struct intel_soc_pmic_config intel_soc_pmic_config_crc;

‎drivers/mfd/intel_soc_pmic_crc.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ static const struct regmap_irq crystal_cove_irqs[] = {
143143
},
144144
};
145145

146-
static struct regmap_irq_chip crystal_cove_irq_chip = {
146+
static const struct regmap_irq_chip crystal_cove_irq_chip = {
147147
.name = "Crystal Cove",
148148
.irqs = crystal_cove_irqs,
149149
.num_irqs = ARRAY_SIZE(crystal_cove_irqs),

0 commit comments

Comments
 (0)