瀏覽代碼

mfd: sec: Constify regmap configs and regmap irqs

Add "const" to "static struct regmap_irq" and "static struct
regmap_config".

Acked-by: Sangbeom Kim <sbkim73@samsung.com>
Reviewed-by: Mark Brown <broonie@linaro.org>
Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Krzysztof Kozlowski 11 年之前
父節點
當前提交
a30fffb060
共有 2 個文件被更改,包括 10 次插入10 次删除
  1. 4 4
      drivers/mfd/sec-core.c
  2. 6 6
      drivers/mfd/sec-irq.c

+ 4 - 4
drivers/mfd/sec-core.c

@@ -134,12 +134,12 @@ static bool s5m8763_volatile(struct device *dev, unsigned int reg)
 	}
 	}
 }
 }
 
 
-static struct regmap_config sec_regmap_config = {
+static const struct regmap_config sec_regmap_config = {
 	.reg_bits = 8,
 	.reg_bits = 8,
 	.val_bits = 8,
 	.val_bits = 8,
 };
 };
 
 
-static struct regmap_config s2mps11_regmap_config = {
+static const struct regmap_config s2mps11_regmap_config = {
 	.reg_bits = 8,
 	.reg_bits = 8,
 	.val_bits = 8,
 	.val_bits = 8,
 
 
@@ -148,7 +148,7 @@ static struct regmap_config s2mps11_regmap_config = {
 	.cache_type = REGCACHE_FLAT,
 	.cache_type = REGCACHE_FLAT,
 };
 };
 
 
-static struct regmap_config s5m8763_regmap_config = {
+static const struct regmap_config s5m8763_regmap_config = {
 	.reg_bits = 8,
 	.reg_bits = 8,
 	.val_bits = 8,
 	.val_bits = 8,
 
 
@@ -157,7 +157,7 @@ static struct regmap_config s5m8763_regmap_config = {
 	.cache_type = REGCACHE_FLAT,
 	.cache_type = REGCACHE_FLAT,
 };
 };
 
 
-static struct regmap_config s5m8767_regmap_config = {
+static const struct regmap_config s5m8767_regmap_config = {
 	.reg_bits = 8,
 	.reg_bits = 8,
 	.val_bits = 8,
 	.val_bits = 8,
 
 

+ 6 - 6
drivers/mfd/sec-irq.c

@@ -22,7 +22,7 @@
 #include <linux/mfd/samsung/s5m8763.h>
 #include <linux/mfd/samsung/s5m8763.h>
 #include <linux/mfd/samsung/s5m8767.h>
 #include <linux/mfd/samsung/s5m8767.h>
 
 
-static struct regmap_irq s2mps11_irqs[] = {
+static const struct regmap_irq s2mps11_irqs[] = {
 	[S2MPS11_IRQ_PWRONF] = {
 	[S2MPS11_IRQ_PWRONF] = {
 		.reg_offset = 0,
 		.reg_offset = 0,
 		.mask = S2MPS11_IRQ_PWRONF_MASK,
 		.mask = S2MPS11_IRQ_PWRONF_MASK,
@@ -90,7 +90,7 @@ static struct regmap_irq s2mps11_irqs[] = {
 };
 };
 
 
 
 
-static struct regmap_irq s5m8767_irqs[] = {
+static const struct regmap_irq s5m8767_irqs[] = {
 	[S5M8767_IRQ_PWRR] = {
 	[S5M8767_IRQ_PWRR] = {
 		.reg_offset = 0,
 		.reg_offset = 0,
 		.mask = S5M8767_IRQ_PWRR_MASK,
 		.mask = S5M8767_IRQ_PWRR_MASK,
@@ -161,7 +161,7 @@ static struct regmap_irq s5m8767_irqs[] = {
 	},
 	},
 };
 };
 
 
-static struct regmap_irq s5m8763_irqs[] = {
+static const struct regmap_irq s5m8763_irqs[] = {
 	[S5M8763_IRQ_DCINF] = {
 	[S5M8763_IRQ_DCINF] = {
 		.reg_offset = 0,
 		.reg_offset = 0,
 		.mask = S5M8763_IRQ_DCINF_MASK,
 		.mask = S5M8763_IRQ_DCINF_MASK,
@@ -236,7 +236,7 @@ static struct regmap_irq s5m8763_irqs[] = {
 	},
 	},
 };
 };
 
 
-static struct regmap_irq_chip s2mps11_irq_chip = {
+static const struct regmap_irq_chip s2mps11_irq_chip = {
 	.name = "s2mps11",
 	.name = "s2mps11",
 	.irqs = s2mps11_irqs,
 	.irqs = s2mps11_irqs,
 	.num_irqs = ARRAY_SIZE(s2mps11_irqs),
 	.num_irqs = ARRAY_SIZE(s2mps11_irqs),
@@ -246,7 +246,7 @@ static struct regmap_irq_chip s2mps11_irq_chip = {
 	.ack_base = S2MPS11_REG_INT1,
 	.ack_base = S2MPS11_REG_INT1,
 };
 };
 
 
-static struct regmap_irq_chip s5m8767_irq_chip = {
+static const struct regmap_irq_chip s5m8767_irq_chip = {
 	.name = "s5m8767",
 	.name = "s5m8767",
 	.irqs = s5m8767_irqs,
 	.irqs = s5m8767_irqs,
 	.num_irqs = ARRAY_SIZE(s5m8767_irqs),
 	.num_irqs = ARRAY_SIZE(s5m8767_irqs),
@@ -256,7 +256,7 @@ static struct regmap_irq_chip s5m8767_irq_chip = {
 	.ack_base = S5M8767_REG_INT1,
 	.ack_base = S5M8767_REG_INT1,
 };
 };
 
 
-static struct regmap_irq_chip s5m8763_irq_chip = {
+static const struct regmap_irq_chip s5m8763_irq_chip = {
 	.name = "s5m8763",
 	.name = "s5m8763",
 	.irqs = s5m8763_irqs,
 	.irqs = s5m8763_irqs,
 	.num_irqs = ARRAY_SIZE(s5m8763_irqs),
 	.num_irqs = ARRAY_SIZE(s5m8763_irqs),