Skip to content

Commit 9544cc6

Browse files
javiercarrascocruzlag-linaro
authored andcommitted
mfd: tps65910: Constify struct regmap_irq_chip
`tps65910_irq_chip` and `tps65911_irq_chip` are not modified and can be declared as const to move their data to a read-only section. The pointer used to reference those structs has also been converted to const. Signed-off-by: Javier Carrasco <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Lee Jones <[email protected]>
1 parent 36b6675 commit 9544cc6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/mfd/tps65910.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ static const struct regmap_irq tps65910_irqs[] = {
197197
},
198198
};
199199

200-
static struct regmap_irq_chip tps65911_irq_chip = {
200+
static const struct regmap_irq_chip tps65911_irq_chip = {
201201
.name = "tps65910",
202202
.irqs = tps65911_irqs,
203203
.num_irqs = ARRAY_SIZE(tps65911_irqs),
@@ -208,7 +208,7 @@ static struct regmap_irq_chip tps65911_irq_chip = {
208208
.ack_base = TPS65910_INT_STS,
209209
};
210210

211-
static struct regmap_irq_chip tps65910_irq_chip = {
211+
static const struct regmap_irq_chip tps65910_irq_chip = {
212212
.name = "tps65910",
213213
.irqs = tps65910_irqs,
214214
.num_irqs = ARRAY_SIZE(tps65910_irqs),
@@ -223,7 +223,7 @@ static int tps65910_irq_init(struct tps65910 *tps65910, int irq,
223223
struct tps65910_platform_data *pdata)
224224
{
225225
int ret;
226-
static struct regmap_irq_chip *tps6591x_irqs_chip;
226+
static const struct regmap_irq_chip *tps6591x_irqs_chip;
227227

228228
if (!irq) {
229229
dev_warn(tps65910->dev, "No interrupt support, no core IRQ\n");

0 commit comments

Comments
 (0)