Skip to contentSkip to conversation

drivers: make regmap_irq_chip const

PATCH In review Bhumika Goyal 2 participants 4 messages Aug 12, 2017 – Aug 14, 2017

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

cover drivers: make regmap_irq_chip const

Make these structures const. Done using Coccinelle.

Bhumika Goyal (2):
mfd: make regmap_irq_chip const
gpio: make regmap_irq_chip const

 drivers/gpio/gpio-max77620.c       | 2 +-
 drivers/mfd/bd9571mwv.c            | 2 +-
 drivers/mfd/intel_soc_pmic_bxtwc.c | 2 +-
 drivers/mfd/tps65086.c             | 2 +-
 drivers/mfd/tps65090.c             | 2 +-
 drivers/mfd/tps65218.c             | 2 +-
 drivers/mfd/tps65912-core.c        | 2 +-
 drivers/mfd/tps80031.c             | 2 +-
 drivers/mfd/twl6040.c              | 2 +-
 9 files changed, 9 insertions(+), 9 deletions(-)
Signature · 1 line
1.9.1
#1 lore raw

PATCH 1/2 mfd: make regmap_irq_chip const

Make these const as they are either passed to the function devm_regmap_add_irq_chip or regmap_add_irq_chip having the corresponding arguments as const.
Done using Coccinelle.

---
 drivers/mfd/bd9571mwv.c            | 2 +-
 drivers/mfd/intel_soc_pmic_bxtwc.c | 2 +-
 drivers/mfd/tps65086.c             | 2 +-
 drivers/mfd/tps65090.c             | 2 +-
 drivers/mfd/tps65218.c             | 2 +-
 drivers/mfd/tps65912-core.c        | 2 +-
 drivers/mfd/tps80031.c             | 2 +-
 drivers/mfd/twl6040.c              | 2 +-
 8 files changed, 8 insertions(+), 8 deletions(-)
drivers/mfd/bd9571mwv.c +1 -1
index 64e088d..6c1668c 100644
@@ -96,7 +96,7 @@
 		       BD9571MWV_INT_INTREQ_BKUP_TRG_INT),
 };
 
-static struct regmap_irq_chip bd9571mwv_irq_chip = {
+static const struct regmap_irq_chip bd9571mwv_irq_chip = {
 	.name		= "bd9571mwv",
 	.status_base	= BD9571MWV_INT_INTREQ,
 	.mask_base	= BD9571MWV_INT_INTMASK,
drivers/mfd/intel_soc_pmic_bxtwc.c +1 -1
index 15bc052..7396d8a 100644
@@ -138,7 +138,7 @@ enum bxtwc_irqs_crit {
 	REGMAP_IRQ_REG(BXTWC_CRIT_IRQ, 0, 0x03),
 };
 
-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,
drivers/mfd/tps65086.c +1 -1
index 43119a6..24b5999 100644
@@ -51,7 +51,7 @@
 	REGMAP_IRQ_REG(TPS65086_IRQ_FAULT, 0, TPS65086_IRQ_FAULT_MASK),
 };
 
-static struct regmap_irq_chip tps65086_irq_chip = {
+static const struct regmap_irq_chip tps65086_irq_chip = {
 	.name = "tps65086",
 	.status_base = TPS65086_IRQ,
 	.mask_base = TPS65086_IRQ_MASK,
drivers/mfd/tps65090.c +1 -1
index d7ec318..48d93b2 100644
@@ -130,7 +130,7 @@ enum tps65090_cells {
 	},
 };
 
-static struct regmap_irq_chip tps65090_irq_chip = {
+static const struct regmap_irq_chip tps65090_irq_chip = {
 	.name = "tps65090",
 	.irqs = tps65090_irqs,
 	.num_irqs = ARRAY_SIZE(tps65090_irqs),
drivers/mfd/tps65218.c +1 -1
index 13834a0..269f90ce 100644
@@ -195,7 +195,7 @@ int tps65218_clear_bits(struct tps65218 *tps, unsigned int reg,
 	},
 };
 
-static struct regmap_irq_chip tps65218_irq_chip = {
+static const struct regmap_irq_chip tps65218_irq_chip = {
 	.name = "tps65218",
 	.irqs = tps65218_irqs,
 	.num_irqs = ARRAY_SIZE(tps65218_irqs),
drivers/mfd/tps65912-core.c +1 -1
index f33567b..dbc71f0 100644
@@ -65,7 +65,7 @@
 	REGMAP_IRQ_REG(TPS65912_IRQ_PGOOD_LDO10, 3, TPS65912_INT_STS4_PGOOD_LDO10),
 };
 
-static struct regmap_irq_chip tps65912_irq_chip = {
+static const struct regmap_irq_chip tps65912_irq_chip = {
 	.name = "tps65912",
 	.irqs = tps65912_irqs,
 	.num_irqs = ARRAY_SIZE(tps65912_irqs),
drivers/mfd/tps80031.c +1 -1
index 0812df3..7ce4bc8 100644
@@ -114,7 +114,7 @@ struct tps80031_pupd_data {
 	[TPS80031_INT_RES2]		= TPS80031_IRQ(C, 7),
 };
 
-static struct regmap_irq_chip tps80031_irq_chip = {
+static const struct regmap_irq_chip tps80031_irq_chip = {
 	.name = "tps80031",
 	.irqs = tps80031_main_irqs,
 	.num_irqs = ARRAY_SIZE(tps80031_main_irqs),
drivers/mfd/twl6040.c +1 -1
index d66502d..a1b6521 100644
@@ -621,7 +621,7 @@ static bool twl6040_writeable_reg(struct device *dev, unsigned int reg)
 	{ .reg_offset = 0, .mask = TWL6040_READYINT, },
 };
 
-static struct regmap_irq_chip twl6040_irq_chip = {
+static const struct regmap_irq_chip twl6040_irq_chip = {
 	.name = "twl6040",
 	.irqs = twl6040_irqs,
 	.num_irqs = ARRAY_SIZE(twl6040_irqs),
Signature · 1 line
1.9.1
#2 lore raw

PATCH 2/2 gpio: make regmap_irq_chip const

In reply to Bhumika Goyal

Make the structure const as it is only passed to the function devm_regmap_add_irq_chip having the corresponding argument as const. Done using Coccinelle.

---
 drivers/gpio/gpio-max77620.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpio/gpio-max77620.c +1 -1
index 743459d..538bce4 100644
@@ -82,7 +82,7 @@ struct max77620_gpio {
 	},
 };
 
-static struct regmap_irq_chip max77620_gpio_irq_chip = {
+static const struct regmap_irq_chip max77620_gpio_irq_chip = {
 	.name = "max77620-gpio",
 	.irqs = max77620_gpio_irqs,
 	.num_irqs = ARRAY_SIZE(max77620_gpio_irqs),
Signature · 1 line
1.9.1
#3 lore raw

Re: [PATCH 2/2] gpio: make regmap_irq_chip const

Quoted 5 lines · Bhumika Goyal

Make the structure const as it is only passed to the function devm_regmap_add_irq_chip having the corresponding argument as const. Done using Coccinelle.

Patch applied.

Yours,
Linus Walleij