aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKrzysztof Kozlowski <k.kozlowski.k@gmail.com>2015-04-27 08:54:13 -0400
committerLee Jones <lee.jones@linaro.org>2015-06-22 07:25:01 -0400
commit7ce7b26f84cfcbcb04f526f56f685a56ccddf355 (patch)
tree33c78fde9eee73e24ec91e1f98051eb9909d5b91
parent79aa79342c70c47a6e55f4865e8154f155109946 (diff)
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 <k.kozlowski.k@gmail.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
-rw-r--r--drivers/mfd/88pm860x-core.c2
-rw-r--r--drivers/mfd/ab8500-core.c2
-rw-r--r--drivers/mfd/arizona-irq.c2
-rw-r--r--drivers/mfd/da9052-irq.c4
-rw-r--r--drivers/mfd/da9055-core.c6
-rw-r--r--drivers/mfd/da9063-irq.c4
-rw-r--r--drivers/mfd/da9150-core.c4
-rw-r--r--drivers/mfd/db8500-prcmu.c2
-rw-r--r--drivers/mfd/intel_soc_pmic_core.h2
-rw-r--r--drivers/mfd/intel_soc_pmic_crc.c2
-rw-r--r--drivers/mfd/lp8788-irq.c2
-rw-r--r--drivers/mfd/max8925-core.c2
-rw-r--r--drivers/mfd/max8997-irq.c2
-rw-r--r--drivers/mfd/max8998-irq.c2
-rw-r--r--drivers/mfd/mt6397-core.c2
-rw-r--r--drivers/mfd/stmpe.c2
-rw-r--r--drivers/mfd/tc3589x.c2
-rw-r--r--drivers/mfd/tps6586x.c2
-rw-r--r--drivers/mfd/twl6030-irq.c2
-rw-r--r--drivers/mfd/wm831x-irq.c2
-rw-r--r--drivers/mfd/wm8994-irq.c6
-rw-r--r--include/linux/mfd/da9055/core.h2
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,
566 return 0; 566 return 0;
567} 567}
568 568
569static struct irq_domain_ops pm860x_irq_domain_ops = { 569static const struct irq_domain_ops pm860x_irq_domain_ops = {
570 .map = pm860x_irq_domain_map, 570 .map = pm860x_irq_domain_map,
571 .xlate = irq_domain_xlate_onetwocell, 571 .xlate = irq_domain_xlate_onetwocell,
572}; 572};
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,
574 return 0; 574 return 0;
575} 575}
576 576
577static struct irq_domain_ops ab8500_irq_ops = { 577static const struct irq_domain_ops ab8500_irq_ops = {
578 .map = ab8500_irq_map, 578 .map = ab8500_irq_map,
579 .xlate = irq_domain_xlate_twocell, 579 .xlate = irq_domain_xlate_twocell,
580}; 580};
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,
186 return 0; 186 return 0;
187} 187}
188 188
189static struct irq_domain_ops arizona_domain_ops = { 189static const struct irq_domain_ops arizona_domain_ops = {
190 .map = arizona_irq_map, 190 .map = arizona_irq_map,
191 .xlate = irq_domain_xlate_twocell, 191 .xlate = irq_domain_xlate_twocell,
192}; 192};
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 @@
35#define DA9052_IRQ_MASK_POS_7 0x40 35#define DA9052_IRQ_MASK_POS_7 0x40
36#define DA9052_IRQ_MASK_POS_8 0x80 36#define DA9052_IRQ_MASK_POS_8 0x80
37 37
38static struct regmap_irq da9052_irqs[] = { 38static const struct regmap_irq da9052_irqs[] = {
39 [DA9052_IRQ_DCIN] = { 39 [DA9052_IRQ_DCIN] = {
40 .reg_offset = 0, 40 .reg_offset = 0,
41 .mask = DA9052_IRQ_MASK_POS_1, 41 .mask = DA9052_IRQ_MASK_POS_1,
@@ -166,7 +166,7 @@ static struct regmap_irq da9052_irqs[] = {
166 }, 166 },
167}; 167};
168 168
169static struct regmap_irq_chip da9052_regmap_irq_chip = { 169static const struct regmap_irq_chip da9052_regmap_irq_chip = {
170 .name = "da9052_irq", 170 .name = "da9052_irq",
171 .status_base = DA9052_EVENT_A_REG, 171 .status_base = DA9052_EVENT_A_REG,
172 .mask_base = DA9052_IRQ_MASK_A_REG, 172 .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)
222 } 222 }
223} 223}
224 224
225static struct regmap_irq da9055_irqs[] = { 225static const struct regmap_irq da9055_irqs[] = {
226 [DA9055_IRQ_NONKEY] = { 226 [DA9055_IRQ_NONKEY] = {
227 .reg_offset = 0, 227 .reg_offset = 0,
228 .mask = DA9055_IRQ_NONKEY_MASK, 228 .mask = DA9055_IRQ_NONKEY_MASK,
@@ -245,7 +245,7 @@ static struct regmap_irq da9055_irqs[] = {
245 }, 245 },
246}; 246};
247 247
248struct regmap_config da9055_regmap_config = { 248const struct regmap_config da9055_regmap_config = {
249 .reg_bits = 8, 249 .reg_bits = 8,
250 .val_bits = 8, 250 .val_bits = 8,
251 251
@@ -367,7 +367,7 @@ static const struct mfd_cell da9055_devs[] = {
367 }, 367 },
368}; 368};
369 369
370static struct regmap_irq_chip da9055_regmap_irq_chip = { 370static const struct regmap_irq_chip da9055_regmap_irq_chip = {
371 .name = "da9055_irq", 371 .name = "da9055_irq",
372 .status_base = DA9055_REG_EVENT_A, 372 .status_base = DA9055_REG_EVENT_A,
373 .mask_base = DA9055_REG_IRQ_MASK_A, 373 .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 {
34 u8 mask; 34 u8 mask;
35}; 35};
36 36
37static struct regmap_irq da9063_irqs[] = { 37static const struct regmap_irq da9063_irqs[] = {
38 /* DA9063 event A register */ 38 /* DA9063 event A register */
39 [DA9063_IRQ_ONKEY] = { 39 [DA9063_IRQ_ONKEY] = {
40 .reg_offset = DA9063_REG_EVENT_A_OFFSET, 40 .reg_offset = DA9063_REG_EVENT_A_OFFSET,
@@ -153,7 +153,7 @@ static struct regmap_irq da9063_irqs[] = {
153 }, 153 },
154}; 154};
155 155
156static struct regmap_irq_chip da9063_irq_chip = { 156static const struct regmap_irq_chip da9063_irq_chip = {
157 .name = "da9063-irq", 157 .name = "da9063-irq",
158 .irqs = da9063_irqs, 158 .irqs = da9063_irqs,
159 .num_irqs = DA9063_NUM_IRQ, 159 .num_irqs = DA9063_NUM_IRQ,
diff --git a/drivers/mfd/da9150-core.c b/drivers/mfd/da9150-core.c
index 5549817df32e..94b9bbd1a69b 100644
--- a/drivers/mfd/da9150-core.c
+++ b/drivers/mfd/da9150-core.c
@@ -164,7 +164,7 @@ void da9150_bulk_write(struct da9150 *da9150, u16 reg, int count, const u8 *buf)
164} 164}
165EXPORT_SYMBOL_GPL(da9150_bulk_write); 165EXPORT_SYMBOL_GPL(da9150_bulk_write);
166 166
167static struct regmap_irq da9150_irqs[] = { 167static const struct regmap_irq da9150_irqs[] = {
168 [DA9150_IRQ_VBUS] = { 168 [DA9150_IRQ_VBUS] = {
169 .reg_offset = 0, 169 .reg_offset = 0,
170 .mask = DA9150_E_VBUS_MASK, 170 .mask = DA9150_E_VBUS_MASK,
@@ -251,7 +251,7 @@ static struct regmap_irq da9150_irqs[] = {
251 }, 251 },
252}; 252};
253 253
254static struct regmap_irq_chip da9150_regmap_irq_chip = { 254static const struct regmap_irq_chip da9150_regmap_irq_chip = {
255 .name = "da9150_irq", 255 .name = "da9150_irq",
256 .status_base = DA9150_EVENT_E, 256 .status_base = DA9150_EVENT_E,
257 .mask_base = DA9150_IRQ_MASK_E, 257 .mask_base = DA9150_IRQ_MASK_E,
diff --git a/drivers/mfd/db8500-prcmu.c b/drivers/mfd/db8500-prcmu.c
index cc1a404328c2..8b14740f9fca 100644
--- a/drivers/mfd/db8500-prcmu.c
+++ b/drivers/mfd/db8500-prcmu.c
@@ -2659,7 +2659,7 @@ static int db8500_irq_map(struct irq_domain *d, unsigned int virq,
2659 return 0; 2659 return 0;
2660} 2660}
2661 2661
2662static struct irq_domain_ops db8500_irq_ops = { 2662static const struct irq_domain_ops db8500_irq_ops = {
2663 .map = db8500_irq_map, 2663 .map = db8500_irq_map,
2664 .xlate = irq_domain_xlate_twocell, 2664 .xlate = irq_domain_xlate_twocell,
2665}; 2665};
diff --git a/drivers/mfd/intel_soc_pmic_core.h b/drivers/mfd/intel_soc_pmic_core.h
index 9498d6719847..ff2464bc172f 100644
--- a/drivers/mfd/intel_soc_pmic_core.h
+++ b/drivers/mfd/intel_soc_pmic_core.h
@@ -24,7 +24,7 @@ struct intel_soc_pmic_config {
24 struct mfd_cell *cell_dev; 24 struct mfd_cell *cell_dev;
25 int n_cell_devs; 25 int n_cell_devs;
26 const struct regmap_config *regmap_config; 26 const struct regmap_config *regmap_config;
27 struct regmap_irq_chip *irq_chip; 27 const struct regmap_irq_chip *irq_chip;
28}; 28};
29 29
30extern struct intel_soc_pmic_config intel_soc_pmic_config_crc; 30extern struct intel_soc_pmic_config intel_soc_pmic_config_crc;
diff --git a/drivers/mfd/intel_soc_pmic_crc.c b/drivers/mfd/intel_soc_pmic_crc.c
index 4cc1b324e971..7436075e8983 100644
--- a/drivers/mfd/intel_soc_pmic_crc.c
+++ b/drivers/mfd/intel_soc_pmic_crc.c
@@ -143,7 +143,7 @@ static const struct regmap_irq crystal_cove_irqs[] = {
143 }, 143 },
144}; 144};
145 145
146static struct regmap_irq_chip crystal_cove_irq_chip = { 146static const struct regmap_irq_chip crystal_cove_irq_chip = {
147 .name = "Crystal Cove", 147 .name = "Crystal Cove",
148 .irqs = crystal_cove_irqs, 148 .irqs = crystal_cove_irqs,
149 .num_irqs = ARRAY_SIZE(crystal_cove_irqs), 149 .num_irqs = ARRAY_SIZE(crystal_cove_irqs),
diff --git a/drivers/mfd/lp8788-irq.c b/drivers/mfd/lp8788-irq.c
index 23982dbf014d..a87f2b548f71 100644
--- a/drivers/mfd/lp8788-irq.c
+++ b/drivers/mfd/lp8788-irq.c
@@ -151,7 +151,7 @@ static int lp8788_irq_map(struct irq_domain *d, unsigned int virq,
151 return 0; 151 return 0;
152} 152}
153 153
154static struct irq_domain_ops lp8788_domain_ops = { 154static const struct irq_domain_ops lp8788_domain_ops = {
155 .map = lp8788_irq_map, 155 .map = lp8788_irq_map,
156}; 156};
157 157
diff --git a/drivers/mfd/max8925-core.c b/drivers/mfd/max8925-core.c
index 97a787ab3d51..8520bd68c1ff 100644
--- a/drivers/mfd/max8925-core.c
+++ b/drivers/mfd/max8925-core.c
@@ -658,7 +658,7 @@ static int max8925_irq_domain_map(struct irq_domain *d, unsigned int virq,
658 return 0; 658 return 0;
659} 659}
660 660
661static struct irq_domain_ops max8925_irq_domain_ops = { 661static const struct irq_domain_ops max8925_irq_domain_ops = {
662 .map = max8925_irq_domain_map, 662 .map = max8925_irq_domain_map,
663 .xlate = irq_domain_xlate_onetwocell, 663 .xlate = irq_domain_xlate_onetwocell,
664}; 664};
diff --git a/drivers/mfd/max8997-irq.c b/drivers/mfd/max8997-irq.c
index 43fa61413e93..d3025be57f39 100644
--- a/drivers/mfd/max8997-irq.c
+++ b/drivers/mfd/max8997-irq.c
@@ -303,7 +303,7 @@ static int max8997_irq_domain_map(struct irq_domain *d, unsigned int irq,
303 return 0; 303 return 0;
304} 304}
305 305
306static struct irq_domain_ops max8997_irq_domain_ops = { 306static const struct irq_domain_ops max8997_irq_domain_ops = {
307 .map = max8997_irq_domain_map, 307 .map = max8997_irq_domain_map,
308}; 308};
309 309
diff --git a/drivers/mfd/max8998-irq.c b/drivers/mfd/max8998-irq.c
index c469477eb778..3702056628a8 100644
--- a/drivers/mfd/max8998-irq.c
+++ b/drivers/mfd/max8998-irq.c
@@ -214,7 +214,7 @@ static int max8998_irq_domain_map(struct irq_domain *d, unsigned int irq,
214 return 0; 214 return 0;
215} 215}
216 216
217static struct irq_domain_ops max8998_irq_domain_ops = { 217static const struct irq_domain_ops max8998_irq_domain_ops = {
218 .map = max8998_irq_domain_map, 218 .map = max8998_irq_domain_map,
219}; 219};
220 220
diff --git a/drivers/mfd/mt6397-core.c b/drivers/mfd/mt6397-core.c
index 09bc7804952a..32775ebbce18 100644
--- a/drivers/mfd/mt6397-core.c
+++ b/drivers/mfd/mt6397-core.c
@@ -130,7 +130,7 @@ static int mt6397_irq_domain_map(struct irq_domain *d, unsigned int irq,
130 return 0; 130 return 0;
131} 131}
132 132
133static struct irq_domain_ops mt6397_irq_domain_ops = { 133static const struct irq_domain_ops mt6397_irq_domain_ops = {
134 .map = mt6397_irq_domain_map, 134 .map = mt6397_irq_domain_map,
135}; 135};
136 136
diff --git a/drivers/mfd/stmpe.c b/drivers/mfd/stmpe.c
index 2d7fae94c861..18c4d72d1d2a 100644
--- a/drivers/mfd/stmpe.c
+++ b/drivers/mfd/stmpe.c
@@ -989,7 +989,7 @@ static void stmpe_irq_unmap(struct irq_domain *d, unsigned int virq)
989 irq_set_chip_data(virq, NULL); 989 irq_set_chip_data(virq, NULL);
990} 990}
991 991
992static struct irq_domain_ops stmpe_irq_ops = { 992static const struct irq_domain_ops stmpe_irq_ops = {
993 .map = stmpe_irq_map, 993 .map = stmpe_irq_map,
994 .unmap = stmpe_irq_unmap, 994 .unmap = stmpe_irq_unmap,
995 .xlate = irq_domain_xlate_twocell, 995 .xlate = irq_domain_xlate_twocell,
diff --git a/drivers/mfd/tc3589x.c b/drivers/mfd/tc3589x.c
index cf356395c9e9..96d420dfc15d 100644
--- a/drivers/mfd/tc3589x.c
+++ b/drivers/mfd/tc3589x.c
@@ -233,7 +233,7 @@ static void tc3589x_irq_unmap(struct irq_domain *d, unsigned int virq)
233 irq_set_chip_data(virq, NULL); 233 irq_set_chip_data(virq, NULL);
234} 234}
235 235
236static struct irq_domain_ops tc3589x_irq_ops = { 236static const struct irq_domain_ops tc3589x_irq_ops = {
237 .map = tc3589x_irq_map, 237 .map = tc3589x_irq_map,
238 .unmap = tc3589x_irq_unmap, 238 .unmap = tc3589x_irq_unmap,
239 .xlate = irq_domain_xlate_onecell, 239 .xlate = irq_domain_xlate_onecell,
diff --git a/drivers/mfd/tps6586x.c b/drivers/mfd/tps6586x.c
index 8e1dbc469580..e0a2583916ce 100644
--- a/drivers/mfd/tps6586x.c
+++ b/drivers/mfd/tps6586x.c
@@ -311,7 +311,7 @@ static int tps6586x_irq_map(struct irq_domain *h, unsigned int virq,
311 return 0; 311 return 0;
312} 312}
313 313
314static struct irq_domain_ops tps6586x_domain_ops = { 314static const struct irq_domain_ops tps6586x_domain_ops = {
315 .map = tps6586x_irq_map, 315 .map = tps6586x_irq_map,
316 .xlate = irq_domain_xlate_twocell, 316 .xlate = irq_domain_xlate_twocell,
317}; 317};
diff --git a/drivers/mfd/twl6030-irq.c b/drivers/mfd/twl6030-irq.c
index 2807e1a95663..20fb58179ada 100644
--- a/drivers/mfd/twl6030-irq.c
+++ b/drivers/mfd/twl6030-irq.c
@@ -376,7 +376,7 @@ static void twl6030_irq_unmap(struct irq_domain *d, unsigned int virq)
376 irq_set_chip_data(virq, NULL); 376 irq_set_chip_data(virq, NULL);
377} 377}
378 378
379static struct irq_domain_ops twl6030_irq_domain_ops = { 379static const struct irq_domain_ops twl6030_irq_domain_ops = {
380 .map = twl6030_irq_map, 380 .map = twl6030_irq_map,
381 .unmap = twl6030_irq_unmap, 381 .unmap = twl6030_irq_unmap,
382 .xlate = irq_domain_xlate_onetwocell, 382 .xlate = irq_domain_xlate_onetwocell,
diff --git a/drivers/mfd/wm831x-irq.c b/drivers/mfd/wm831x-irq.c
index 64e512eadf17..3da81263c764 100644
--- a/drivers/mfd/wm831x-irq.c
+++ b/drivers/mfd/wm831x-irq.c
@@ -564,7 +564,7 @@ static int wm831x_irq_map(struct irq_domain *h, unsigned int virq,
564 return 0; 564 return 0;
565} 565}
566 566
567static struct irq_domain_ops wm831x_irq_domain_ops = { 567static const struct irq_domain_ops wm831x_irq_domain_ops = {
568 .map = wm831x_irq_map, 568 .map = wm831x_irq_map,
569 .xlate = irq_domain_xlate_twocell, 569 .xlate = irq_domain_xlate_twocell,
570}; 570};
diff --git a/drivers/mfd/wm8994-irq.c b/drivers/mfd/wm8994-irq.c
index a14407edbd89..55c380a67686 100644
--- a/drivers/mfd/wm8994-irq.c
+++ b/drivers/mfd/wm8994-irq.c
@@ -28,7 +28,7 @@
28 28
29#include <linux/delay.h> 29#include <linux/delay.h>
30 30
31static struct regmap_irq wm8994_irqs[] = { 31static const struct regmap_irq wm8994_irqs[] = {
32 [WM8994_IRQ_TEMP_SHUT] = { 32 [WM8994_IRQ_TEMP_SHUT] = {
33 .reg_offset = 1, 33 .reg_offset = 1,
34 .mask = WM8994_TEMP_SHUT_EINT, 34 .mask = WM8994_TEMP_SHUT_EINT,
@@ -128,7 +128,7 @@ static struct regmap_irq wm8994_irqs[] = {
128 }, 128 },
129}; 129};
130 130
131static struct regmap_irq_chip wm8994_irq_chip = { 131static const struct regmap_irq_chip wm8994_irq_chip = {
132 .name = "wm8994", 132 .name = "wm8994",
133 .irqs = wm8994_irqs, 133 .irqs = wm8994_irqs,
134 .num_irqs = ARRAY_SIZE(wm8994_irqs), 134 .num_irqs = ARRAY_SIZE(wm8994_irqs),
@@ -184,7 +184,7 @@ static int wm8994_edge_irq_map(struct irq_domain *h, unsigned int virq,
184 return 0; 184 return 0;
185} 185}
186 186
187static struct irq_domain_ops wm8994_edge_irq_ops = { 187static const struct irq_domain_ops wm8994_edge_irq_ops = {
188 .map = wm8994_edge_irq_map, 188 .map = wm8994_edge_irq_map,
189 .xlate = irq_domain_xlate_twocell, 189 .xlate = irq_domain_xlate_twocell,
190}; 190};
diff --git a/include/linux/mfd/da9055/core.h b/include/linux/mfd/da9055/core.h
index 956afa445998..5dc743fd63a6 100644
--- a/include/linux/mfd/da9055/core.h
+++ b/include/linux/mfd/da9055/core.h
@@ -89,6 +89,6 @@ static inline int da9055_reg_update(struct da9055 *da9055, unsigned char reg,
89int da9055_device_init(struct da9055 *da9055); 89int da9055_device_init(struct da9055 *da9055);
90void da9055_device_exit(struct da9055 *da9055); 90void da9055_device_exit(struct da9055 *da9055);
91 91
92extern struct regmap_config da9055_regmap_config; 92extern const struct regmap_config da9055_regmap_config;
93 93
94#endif /* __DA9055_CORE_H */ 94#endif /* __DA9055_CORE_H */