mfd: Constify regmap and irq configuration data
authorKrzysztof Kozlowski <k.kozlowski.k@gmail.com>
Mon, 27 Apr 2015 12:54:13 +0000 (21:54 +0900)
committerLee Jones <lee.jones@linaro.org>
Mon, 22 Jun 2015 11:25:01 +0000 (12:25 +0100)
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>
22 files changed:
drivers/mfd/88pm860x-core.c
drivers/mfd/ab8500-core.c
drivers/mfd/arizona-irq.c
drivers/mfd/da9052-irq.c
drivers/mfd/da9055-core.c
drivers/mfd/da9063-irq.c
drivers/mfd/da9150-core.c
drivers/mfd/db8500-prcmu.c
drivers/mfd/intel_soc_pmic_core.h
drivers/mfd/intel_soc_pmic_crc.c
drivers/mfd/lp8788-irq.c
drivers/mfd/max8925-core.c
drivers/mfd/max8997-irq.c
drivers/mfd/max8998-irq.c
drivers/mfd/mt6397-core.c
drivers/mfd/stmpe.c
drivers/mfd/tc3589x.c
drivers/mfd/tps6586x.c
drivers/mfd/twl6030-irq.c
drivers/mfd/wm831x-irq.c
drivers/mfd/wm8994-irq.c
include/linux/mfd/da9055/core.h

index d2a85cd..e03b7f4 100644 (file)
@@ -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,
 };
index c80a292..000da72 100644 (file)
@@ -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,
 };
index d063b94..2b9965d 100644 (file)
@@ -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,
 };
index e65ca19..f4cb461 100644 (file)
@@ -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,
index b4d920c..177e65a 100644 (file)
@@ -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,
index 8229226..eaf1ec9 100644 (file)
@@ -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[] = {
        },
 };
 
-static struct regmap_irq_chip da9063_irq_chip = {
+static const struct regmap_irq_chip da9063_irq_chip = {
        .name = "da9063-irq",
        .irqs = da9063_irqs,
        .num_irqs = DA9063_NUM_IRQ,
index 5549817..94b9bbd 100644 (file)
@@ -164,7 +164,7 @@ void da9150_bulk_write(struct da9150 *da9150, u16 reg, int count, const u8 *buf)
 }
 EXPORT_SYMBOL_GPL(da9150_bulk_write);
 
-static struct regmap_irq da9150_irqs[] = {
+static const struct regmap_irq da9150_irqs[] = {
        [DA9150_IRQ_VBUS] = {
                .reg_offset = 0,
                .mask = DA9150_E_VBUS_MASK,
@@ -251,7 +251,7 @@ static struct regmap_irq da9150_irqs[] = {
        },
 };
 
-static struct regmap_irq_chip da9150_regmap_irq_chip = {
+static const struct regmap_irq_chip da9150_regmap_irq_chip = {
        .name = "da9150_irq",
        .status_base = DA9150_EVENT_E,
        .mask_base = DA9150_IRQ_MASK_E,
index cc1a404..8b14740 100644 (file)
@@ -2659,7 +2659,7 @@ static int db8500_irq_map(struct irq_domain *d, unsigned int virq,
        return 0;
 }
 
-static struct irq_domain_ops db8500_irq_ops = {
+static const struct irq_domain_ops db8500_irq_ops = {
        .map    = db8500_irq_map,
        .xlate  = irq_domain_xlate_twocell,
 };
index 9498d67..ff2464b 100644 (file)
@@ -24,7 +24,7 @@ struct intel_soc_pmic_config {
        struct mfd_cell *cell_dev;
        int n_cell_devs;
        const struct regmap_config *regmap_config;
-       struct regmap_irq_chip *irq_chip;
+       const struct regmap_irq_chip *irq_chip;
 };
 
 extern struct intel_soc_pmic_config intel_soc_pmic_config_crc;
index 4cc1b32..7436075 100644 (file)
@@ -143,7 +143,7 @@ static const struct regmap_irq crystal_cove_irqs[] = {
        },
 };
 
-static struct regmap_irq_chip crystal_cove_irq_chip = {
+static const struct regmap_irq_chip crystal_cove_irq_chip = {
        .name = "Crystal Cove",
        .irqs = crystal_cove_irqs,
        .num_irqs = ARRAY_SIZE(crystal_cove_irqs),
index 23982db..a87f2b5 100644 (file)
@@ -151,7 +151,7 @@ static int lp8788_irq_map(struct irq_domain *d, unsigned int virq,
        return 0;
 }
 
-static struct irq_domain_ops lp8788_domain_ops = {
+static const struct irq_domain_ops lp8788_domain_ops = {
        .map = lp8788_irq_map,
 };
 
index 97a787a..8520bd6 100644 (file)
@@ -658,7 +658,7 @@ static int max8925_irq_domain_map(struct irq_domain *d, unsigned int virq,
        return 0;
 }
 
-static struct irq_domain_ops max8925_irq_domain_ops = {
+static const struct irq_domain_ops max8925_irq_domain_ops = {
        .map    = max8925_irq_domain_map,
        .xlate  = irq_domain_xlate_onetwocell,
 };
index 43fa614..d3025be 100644 (file)
@@ -303,7 +303,7 @@ static int max8997_irq_domain_map(struct irq_domain *d, unsigned int irq,
        return 0;
 }
 
-static struct irq_domain_ops max8997_irq_domain_ops = {
+static const struct irq_domain_ops max8997_irq_domain_ops = {
        .map = max8997_irq_domain_map,
 };
 
index c469477..3702056 100644 (file)
@@ -214,7 +214,7 @@ static int max8998_irq_domain_map(struct irq_domain *d, unsigned int irq,
        return 0;
 }
 
-static struct irq_domain_ops max8998_irq_domain_ops = {
+static const struct irq_domain_ops max8998_irq_domain_ops = {
        .map = max8998_irq_domain_map,
 };
 
index 09bc780..32775eb 100644 (file)
@@ -130,7 +130,7 @@ static int mt6397_irq_domain_map(struct irq_domain *d, unsigned int irq,
        return 0;
 }
 
-static struct irq_domain_ops mt6397_irq_domain_ops = {
+static const struct irq_domain_ops mt6397_irq_domain_ops = {
        .map = mt6397_irq_domain_map,
 };
 
index 2d7fae9..18c4d72 100644 (file)
@@ -989,7 +989,7 @@ static void stmpe_irq_unmap(struct irq_domain *d, unsigned int virq)
                irq_set_chip_data(virq, NULL);
 }
 
-static struct irq_domain_ops stmpe_irq_ops = {
+static const struct irq_domain_ops stmpe_irq_ops = {
         .map    = stmpe_irq_map,
         .unmap  = stmpe_irq_unmap,
         .xlate  = irq_domain_xlate_twocell,
index cf35639..96d420d 100644 (file)
@@ -233,7 +233,7 @@ static void tc3589x_irq_unmap(struct irq_domain *d, unsigned int virq)
        irq_set_chip_data(virq, NULL);
 }
 
-static struct irq_domain_ops tc3589x_irq_ops = {
+static const struct irq_domain_ops tc3589x_irq_ops = {
        .map    = tc3589x_irq_map,
        .unmap  = tc3589x_irq_unmap,
        .xlate  = irq_domain_xlate_onecell,
index 8e1dbc4..e0a2583 100644 (file)
@@ -311,7 +311,7 @@ static int tps6586x_irq_map(struct irq_domain *h, unsigned int virq,
        return 0;
 }
 
-static struct irq_domain_ops tps6586x_domain_ops = {
+static const struct irq_domain_ops tps6586x_domain_ops = {
        .map    = tps6586x_irq_map,
        .xlate  = irq_domain_xlate_twocell,
 };
index 2807e1a..20fb581 100644 (file)
@@ -376,7 +376,7 @@ static void twl6030_irq_unmap(struct irq_domain *d, unsigned int virq)
        irq_set_chip_data(virq, NULL);
 }
 
-static struct irq_domain_ops twl6030_irq_domain_ops = {
+static const struct irq_domain_ops twl6030_irq_domain_ops = {
        .map    = twl6030_irq_map,
        .unmap  = twl6030_irq_unmap,
        .xlate  = irq_domain_xlate_onetwocell,
index 64e512e..3da8126 100644 (file)
@@ -564,7 +564,7 @@ static int wm831x_irq_map(struct irq_domain *h, unsigned int virq,
        return 0;
 }
 
-static struct irq_domain_ops wm831x_irq_domain_ops = {
+static const struct irq_domain_ops wm831x_irq_domain_ops = {
        .map    = wm831x_irq_map,
        .xlate  = irq_domain_xlate_twocell,
 };
index a14407e..55c380a 100644 (file)
@@ -28,7 +28,7 @@
 
 #include <linux/delay.h>
 
-static struct regmap_irq wm8994_irqs[] = {
+static const struct regmap_irq wm8994_irqs[] = {
        [WM8994_IRQ_TEMP_SHUT] = {
                .reg_offset = 1,
                .mask = WM8994_TEMP_SHUT_EINT,
@@ -128,7 +128,7 @@ static struct regmap_irq wm8994_irqs[] = {
        },
 };
 
-static struct regmap_irq_chip wm8994_irq_chip = {
+static const struct regmap_irq_chip wm8994_irq_chip = {
        .name = "wm8994",
        .irqs = wm8994_irqs,
        .num_irqs = ARRAY_SIZE(wm8994_irqs),
@@ -184,7 +184,7 @@ static int wm8994_edge_irq_map(struct irq_domain *h, unsigned int virq,
        return 0;
 }
 
-static struct irq_domain_ops wm8994_edge_irq_ops = {
+static const struct irq_domain_ops wm8994_edge_irq_ops = {
        .map    = wm8994_edge_irq_map,
        .xlate  = irq_domain_xlate_twocell,
 };
index 956afa4..5dc743f 100644 (file)
@@ -89,6 +89,6 @@ static inline int da9055_reg_update(struct da9055 *da9055, unsigned char reg,
 int da9055_device_init(struct da9055 *da9055);
 void da9055_device_exit(struct da9055 *da9055);
 
-extern struct regmap_config da9055_regmap_config;
+extern const struct regmap_config da9055_regmap_config;
 
 #endif /* __DA9055_CORE_H */