mfd: intel_soc_pmic_bxtwc: Constify struct regmap_irq_chip
authorJavier Carrasco <javier.carrasco.cruz@gmail.com>
Thu, 4 Jul 2024 17:23:20 +0000 (19:23 +0200)
committerLee Jones <lee@kernel.org>
Fri, 30 Aug 2024 08:40:11 +0000 (09:40 +0100)
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 <javier.carrasco.cruz@gmail.com>
Link: https://lore.kernel.org/r/20240704-mfd-const-regmap_config-v2-10-0c8785b1331d@gmail.com
Signed-off-by: Lee Jones <lee@kernel.org>
drivers/mfd/intel_soc_pmic_bxtwc.c

index ba32cacfc499f3774656187390dd8f96d6ff378f..c07a01c85a4654de928f247b42b31c40de12c306 100644 (file)
@@ -138,7 +138,7 @@ static const struct regmap_irq bxtwc_regmap_irqs_crit[] = {
        REGMAP_IRQ_REG(BXTWC_CRIT_IRQ, 0, GENMASK(1, 0)),
 };
 
-static struct regmap_irq_chip bxtwc_regmap_irq_chip = {
+static const struct regmap_irq_chip bxtwc_regmap_irq_chip = {
        .name = "bxtwc_irq_chip",
        .status_base = BXTWC_IRQLVL1,
        .mask_base = BXTWC_MIRQLVL1,
@@ -147,7 +147,7 @@ static struct regmap_irq_chip bxtwc_regmap_irq_chip = {
        .num_regs = 1,
 };
 
-static struct regmap_irq_chip bxtwc_regmap_irq_chip_pwrbtn = {
+static const struct regmap_irq_chip bxtwc_regmap_irq_chip_pwrbtn = {
        .name = "bxtwc_irq_chip_pwrbtn",
        .status_base = BXTWC_PWRBTNIRQ,
        .mask_base = BXTWC_MPWRBTNIRQ,
@@ -156,7 +156,7 @@ static struct regmap_irq_chip bxtwc_regmap_irq_chip_pwrbtn = {
        .num_regs = 1,
 };
 
-static struct regmap_irq_chip bxtwc_regmap_irq_chip_tmu = {
+static const struct regmap_irq_chip bxtwc_regmap_irq_chip_tmu = {
        .name = "bxtwc_irq_chip_tmu",
        .status_base = BXTWC_TMUIRQ,
        .mask_base = BXTWC_MTMUIRQ,
@@ -165,7 +165,7 @@ static struct regmap_irq_chip bxtwc_regmap_irq_chip_tmu = {
        .num_regs = 1,
 };
 
-static struct regmap_irq_chip bxtwc_regmap_irq_chip_bcu = {
+static const struct regmap_irq_chip bxtwc_regmap_irq_chip_bcu = {
        .name = "bxtwc_irq_chip_bcu",
        .status_base = BXTWC_BCUIRQ,
        .mask_base = BXTWC_MBCUIRQ,
@@ -174,7 +174,7 @@ static struct regmap_irq_chip bxtwc_regmap_irq_chip_bcu = {
        .num_regs = 1,
 };
 
-static struct regmap_irq_chip bxtwc_regmap_irq_chip_adc = {
+static const struct regmap_irq_chip bxtwc_regmap_irq_chip_adc = {
        .name = "bxtwc_irq_chip_adc",
        .status_base = BXTWC_ADCIRQ,
        .mask_base = BXTWC_MADCIRQ,
@@ -183,7 +183,7 @@ static struct regmap_irq_chip bxtwc_regmap_irq_chip_adc = {
        .num_regs = 1,
 };
 
-static struct regmap_irq_chip bxtwc_regmap_irq_chip_chgr = {
+static const struct regmap_irq_chip bxtwc_regmap_irq_chip_chgr = {
        .name = "bxtwc_irq_chip_chgr",
        .status_base = BXTWC_CHGR0IRQ,
        .mask_base = BXTWC_MCHGR0IRQ,
@@ -192,7 +192,7 @@ static struct regmap_irq_chip bxtwc_regmap_irq_chip_chgr = {
        .num_regs = 2,
 };
 
-static struct regmap_irq_chip bxtwc_regmap_irq_chip_crit = {
+static const struct regmap_irq_chip bxtwc_regmap_irq_chip_crit = {
        .name = "bxtwc_irq_chip_crit",
        .status_base = BXTWC_CRITIRQ,
        .mask_base = BXTWC_MCRITIRQ,