Skip to content

Commit a3cf8ba

Browse files
javiercarrascocruzlag-linaro
authored andcommitted
mfd: intel_soc_pmic_bxtwc: Constify struct regmap_irq_chip
The regmap_irq_chip structs 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 657eb79 commit a3cf8ba

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

drivers/mfd/intel_soc_pmic_bxtwc.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ static const struct regmap_irq bxtwc_regmap_irqs_crit[] = {
138138
REGMAP_IRQ_REG(BXTWC_CRIT_IRQ, 0, GENMASK(1, 0)),
139139
};
140140

141-
static struct regmap_irq_chip bxtwc_regmap_irq_chip = {
141+
static const struct regmap_irq_chip bxtwc_regmap_irq_chip = {
142142
.name = "bxtwc_irq_chip",
143143
.status_base = BXTWC_IRQLVL1,
144144
.mask_base = BXTWC_MIRQLVL1,
@@ -147,7 +147,7 @@ static struct regmap_irq_chip bxtwc_regmap_irq_chip = {
147147
.num_regs = 1,
148148
};
149149

150-
static struct regmap_irq_chip bxtwc_regmap_irq_chip_pwrbtn = {
150+
static const struct regmap_irq_chip bxtwc_regmap_irq_chip_pwrbtn = {
151151
.name = "bxtwc_irq_chip_pwrbtn",
152152
.status_base = BXTWC_PWRBTNIRQ,
153153
.mask_base = BXTWC_MPWRBTNIRQ,
@@ -156,7 +156,7 @@ static struct regmap_irq_chip bxtwc_regmap_irq_chip_pwrbtn = {
156156
.num_regs = 1,
157157
};
158158

159-
static struct regmap_irq_chip bxtwc_regmap_irq_chip_tmu = {
159+
static const struct regmap_irq_chip bxtwc_regmap_irq_chip_tmu = {
160160
.name = "bxtwc_irq_chip_tmu",
161161
.status_base = BXTWC_TMUIRQ,
162162
.mask_base = BXTWC_MTMUIRQ,
@@ -165,7 +165,7 @@ static struct regmap_irq_chip bxtwc_regmap_irq_chip_tmu = {
165165
.num_regs = 1,
166166
};
167167

168-
static struct regmap_irq_chip bxtwc_regmap_irq_chip_bcu = {
168+
static const struct regmap_irq_chip bxtwc_regmap_irq_chip_bcu = {
169169
.name = "bxtwc_irq_chip_bcu",
170170
.status_base = BXTWC_BCUIRQ,
171171
.mask_base = BXTWC_MBCUIRQ,
@@ -174,7 +174,7 @@ static struct regmap_irq_chip bxtwc_regmap_irq_chip_bcu = {
174174
.num_regs = 1,
175175
};
176176

177-
static struct regmap_irq_chip bxtwc_regmap_irq_chip_adc = {
177+
static const struct regmap_irq_chip bxtwc_regmap_irq_chip_adc = {
178178
.name = "bxtwc_irq_chip_adc",
179179
.status_base = BXTWC_ADCIRQ,
180180
.mask_base = BXTWC_MADCIRQ,
@@ -183,7 +183,7 @@ static struct regmap_irq_chip bxtwc_regmap_irq_chip_adc = {
183183
.num_regs = 1,
184184
};
185185

186-
static struct regmap_irq_chip bxtwc_regmap_irq_chip_chgr = {
186+
static const struct regmap_irq_chip bxtwc_regmap_irq_chip_chgr = {
187187
.name = "bxtwc_irq_chip_chgr",
188188
.status_base = BXTWC_CHGR0IRQ,
189189
.mask_base = BXTWC_MCHGR0IRQ,
@@ -192,7 +192,7 @@ static struct regmap_irq_chip bxtwc_regmap_irq_chip_chgr = {
192192
.num_regs = 2,
193193
};
194194

195-
static struct regmap_irq_chip bxtwc_regmap_irq_chip_crit = {
195+
static const struct regmap_irq_chip bxtwc_regmap_irq_chip_crit = {
196196
.name = "bxtwc_irq_chip_crit",
197197
.status_base = BXTWC_CRITIRQ,
198198
.mask_base = BXTWC_MCRITIRQ,

0 commit comments

Comments
 (0)