Re: [PATCH] mfd: Constify regmap and irq configuration data
On Mon, 27 Apr 2015, Krzysztof Kozlowski wrote: > 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 > --- > drivers/mfd/88pm860x-core.c | 2 +- > drivers/mfd/ab8500-core.c | 2 +- > drivers/mfd/arizona-irq.c | 2 +- > drivers/mfd/da9052-irq.c | 4 ++-- > drivers/mfd/da9055-core.c | 6 +++--- > drivers/mfd/da9063-irq.c | 4 ++-- > drivers/mfd/da9150-core.c | 4 ++-- > drivers/mfd/db8500-prcmu.c| 2 +- > drivers/mfd/intel_soc_pmic_core.h | 2 +- > drivers/mfd/intel_soc_pmic_crc.c | 2 +- > drivers/mfd/lp8788-irq.c | 2 +- > drivers/mfd/max8925-core.c| 2 +- > drivers/mfd/max8997-irq.c | 2 +- > drivers/mfd/max8998-irq.c | 2 +- > drivers/mfd/mt6397-core.c | 2 +- > drivers/mfd/stmpe.c | 2 +- > drivers/mfd/tc3589x.c | 2 +- > drivers/mfd/tps6586x.c| 2 +- > drivers/mfd/twl6030-irq.c | 2 +- > drivers/mfd/wm831x-irq.c | 2 +- > drivers/mfd/wm8994-irq.c | 6 +++--- > include/linux/mfd/da9055/core.h | 2 +- > 22 files changed, 29 insertions(+), 29 deletions(-) Applied, thanks. > diff --git a/drivers/mfd/88pm860x-core.c b/drivers/mfd/88pm860x-core.c > index d2a85cde68da..e03b7f45b8f7 100644 > --- a/drivers/mfd/88pm860x-core.c > +++ b/drivers/mfd/88pm860x-core.c > @@ -566,7 +566,7 @@ static int pm860x_irq_domain_map(struct irq_domain *d, > unsigned int virq, > return 0; > } > > -static struct irq_domain_ops pm860x_irq_domain_ops = { > +static const struct irq_domain_ops pm860x_irq_domain_ops = { > .map= pm860x_irq_domain_map, > .xlate = irq_domain_xlate_onetwocell, > }; > diff --git a/drivers/mfd/ab8500-core.c b/drivers/mfd/ab8500-core.c > index c80a2925f8e5..000da72a0ae9 100644 > --- a/drivers/mfd/ab8500-core.c > +++ b/drivers/mfd/ab8500-core.c > @@ -574,7 +574,7 @@ static int ab8500_irq_map(struct irq_domain *d, unsigned > int virq, > return 0; > } > > -static struct irq_domain_ops ab8500_irq_ops = { > +static const struct irq_domain_ops ab8500_irq_ops = { > .map= ab8500_irq_map, > .xlate = irq_domain_xlate_twocell, > }; > diff --git a/drivers/mfd/arizona-irq.c b/drivers/mfd/arizona-irq.c > index d063b94b94b5..2b9965d53e4e 100644 > --- a/drivers/mfd/arizona-irq.c > +++ b/drivers/mfd/arizona-irq.c > @@ -186,7 +186,7 @@ static int arizona_irq_map(struct irq_domain *h, unsigned > int virq, > return 0; > } > > -static struct irq_domain_ops arizona_domain_ops = { > +static const struct irq_domain_ops arizona_domain_ops = { > .map= arizona_irq_map, > .xlate = irq_domain_xlate_twocell, > }; > diff --git a/drivers/mfd/da9052-irq.c b/drivers/mfd/da9052-irq.c > index e65ca194fa98..f4cb4613140b 100644 > --- a/drivers/mfd/da9052-irq.c > +++ b/drivers/mfd/da9052-irq.c > @@ -35,7 +35,7 @@ > #define DA9052_IRQ_MASK_POS_70x40 > #define DA9052_IRQ_MASK_POS_80x80 > > -static struct regmap_irq da9052_irqs[] = { > +static const struct regmap_irq da9052_irqs[] = { > [DA9052_IRQ_DCIN] = { > .reg_offset = 0, > .mask = DA9052_IRQ_MASK_POS_1, > @@ -166,7 +166,7 @@ static struct regmap_irq da9052_irqs[] = { > }, > }; > > -static struct regmap_irq_chip da9052_regmap_irq_chip = { > +static const struct regmap_irq_chip da9052_regmap_irq_chip = { > .name = "da9052_irq", > .status_base = DA9052_EVENT_A_REG, > .mask_base = DA9052_IRQ_MASK_A_REG, > diff --git a/drivers/mfd/da9055-core.c b/drivers/mfd/da9055-core.c > index b4d920c1ead1..177e65a12c12 100644 > --- a/drivers/mfd/da9055-core.c > +++ b/drivers/mfd/da9055-core.c > @@ -222,7 +222,7 @@ static bool da9055_register_volatile(struct device *dev, > unsigned int reg) > } > } > > -static struct regmap_irq da9055_irqs[] = { > +static const struct regmap_irq da9055_irqs[] = { > [DA9055_IRQ_NONKEY] = { > .reg_offset = 0, > .mask = DA9055_IRQ_NONKEY_MASK, > @@ -245,7 +245,7 @@ static struct regmap_irq da9055_irqs[] = { > }, > }; > > -struct regmap_config da9055_regmap_config = { > +const struct regmap_config da9055_regmap_config = { > .reg_bits = 8, > .val_bits = 8, > > @@ -367,7 +367,7 @@ static const struct mfd_cell da9055_devs[] = { > }, > }; > > -static struct regmap_irq_chip da9055_regmap_irq_chip = { > +static const struct regmap_irq_chip da9055_regmap_irq_chip = { > .name = "da9055_irq", > .status_base = DA9055_REG_EVENT_A, > .mask_base = DA9055_REG_IRQ_MASK_A, > diff --git a/drivers/mfd/da9063-irq.c b/drivers/mfd/da9063-irq.c > index 822922602ce9..eaf1ec9208b2 100644 > --- a/drivers/mfd/da9063-irq.c > +++ b/drivers/mfd/da9063-irq.c > @@ -34,7 +34,7 @@ struct da9063_irq_data { > u8
[PATCH] 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 --- drivers/mfd/88pm860x-core.c | 2 +- drivers/mfd/ab8500-core.c | 2 +- drivers/mfd/arizona-irq.c | 2 +- drivers/mfd/da9052-irq.c | 4 ++-- drivers/mfd/da9055-core.c | 6 +++--- drivers/mfd/da9063-irq.c | 4 ++-- drivers/mfd/da9150-core.c | 4 ++-- drivers/mfd/db8500-prcmu.c| 2 +- drivers/mfd/intel_soc_pmic_core.h | 2 +- drivers/mfd/intel_soc_pmic_crc.c | 2 +- drivers/mfd/lp8788-irq.c | 2 +- drivers/mfd/max8925-core.c| 2 +- drivers/mfd/max8997-irq.c | 2 +- drivers/mfd/max8998-irq.c | 2 +- drivers/mfd/mt6397-core.c | 2 +- drivers/mfd/stmpe.c | 2 +- drivers/mfd/tc3589x.c | 2 +- drivers/mfd/tps6586x.c| 2 +- drivers/mfd/twl6030-irq.c | 2 +- drivers/mfd/wm831x-irq.c | 2 +- drivers/mfd/wm8994-irq.c | 6 +++--- include/linux/mfd/da9055/core.h | 2 +- 22 files changed, 29 insertions(+), 29 deletions(-) diff --git a/drivers/mfd/88pm860x-core.c b/drivers/mfd/88pm860x-core.c index d2a85cde68da..e03b7f45b8f7 100644 --- a/drivers/mfd/88pm860x-core.c +++ b/drivers/mfd/88pm860x-core.c @@ -566,7 +566,7 @@ static int pm860x_irq_domain_map(struct irq_domain *d, unsigned int virq, return 0; } -static struct irq_domain_ops pm860x_irq_domain_ops = { +static const struct irq_domain_ops pm860x_irq_domain_ops = { .map= pm860x_irq_domain_map, .xlate = irq_domain_xlate_onetwocell, }; diff --git a/drivers/mfd/ab8500-core.c b/drivers/mfd/ab8500-core.c index c80a2925f8e5..000da72a0ae9 100644 --- a/drivers/mfd/ab8500-core.c +++ b/drivers/mfd/ab8500-core.c @@ -574,7 +574,7 @@ static int ab8500_irq_map(struct irq_domain *d, unsigned int virq, return 0; } -static struct irq_domain_ops ab8500_irq_ops = { +static const struct irq_domain_ops ab8500_irq_ops = { .map= ab8500_irq_map, .xlate = irq_domain_xlate_twocell, }; diff --git a/drivers/mfd/arizona-irq.c b/drivers/mfd/arizona-irq.c index d063b94b94b5..2b9965d53e4e 100644 --- a/drivers/mfd/arizona-irq.c +++ b/drivers/mfd/arizona-irq.c @@ -186,7 +186,7 @@ static int arizona_irq_map(struct irq_domain *h, unsigned int virq, return 0; } -static struct irq_domain_ops arizona_domain_ops = { +static const struct irq_domain_ops arizona_domain_ops = { .map= arizona_irq_map, .xlate = irq_domain_xlate_twocell, }; diff --git a/drivers/mfd/da9052-irq.c b/drivers/mfd/da9052-irq.c index e65ca194fa98..f4cb4613140b 100644 --- a/drivers/mfd/da9052-irq.c +++ b/drivers/mfd/da9052-irq.c @@ -35,7 +35,7 @@ #define DA9052_IRQ_MASK_POS_7 0x40 #define DA9052_IRQ_MASK_POS_8 0x80 -static struct regmap_irq da9052_irqs[] = { +static const struct regmap_irq da9052_irqs[] = { [DA9052_IRQ_DCIN] = { .reg_offset = 0, .mask = DA9052_IRQ_MASK_POS_1, @@ -166,7 +166,7 @@ static struct regmap_irq da9052_irqs[] = { }, }; -static struct regmap_irq_chip da9052_regmap_irq_chip = { +static const struct regmap_irq_chip da9052_regmap_irq_chip = { .name = "da9052_irq", .status_base = DA9052_EVENT_A_REG, .mask_base = DA9052_IRQ_MASK_A_REG, diff --git a/drivers/mfd/da9055-core.c b/drivers/mfd/da9055-core.c index b4d920c1ead1..177e65a12c12 100644 --- a/drivers/mfd/da9055-core.c +++ b/drivers/mfd/da9055-core.c @@ -222,7 +222,7 @@ static bool da9055_register_volatile(struct device *dev, unsigned int reg) } } -static struct regmap_irq da9055_irqs[] = { +static const struct regmap_irq da9055_irqs[] = { [DA9055_IRQ_NONKEY] = { .reg_offset = 0, .mask = DA9055_IRQ_NONKEY_MASK, @@ -245,7 +245,7 @@ static struct regmap_irq da9055_irqs[] = { }, }; -struct regmap_config da9055_regmap_config = { +const struct regmap_config da9055_regmap_config = { .reg_bits = 8, .val_bits = 8, @@ -367,7 +367,7 @@ static const struct mfd_cell da9055_devs[] = { }, }; -static struct regmap_irq_chip da9055_regmap_irq_chip = { +static const struct regmap_irq_chip da9055_regmap_irq_chip = { .name = "da9055_irq", .status_base = DA9055_REG_EVENT_A, .mask_base = DA9055_REG_IRQ_MASK_A, diff --git a/drivers/mfd/da9063-irq.c b/drivers/mfd/da9063-irq.c index 822922602ce9..eaf1ec9208b2 100644 --- a/drivers/mfd/da9063-irq.c +++ b/drivers/mfd/da9063-irq.c @@ -34,7 +34,7 @@ struct da9063_irq_data { u8 mask; }; -static struct regmap_irq da9063_irqs[] = { +static const struct regmap_irq da9063_irqs[] = { /* DA9063 event A register */ [DA9063_IRQ_ONKEY] = { .reg_offset = DA9063_REG_EVENT_A_OFFSET, @@ -153,7 +153,7 @@ static struct regmap_irq da9063_irqs