Skip to contentSkip to conversation

mfd: altera-a10sr: Make altr_a10sr_regmap_config static const

PATCH Applied Axel Lin 3 participants 3 messages Aug 5, 2016 – Aug 9, 2016 Multifunction devices (MFD)

lore
Share & tools
lore

Axel Lin

author
#0 lore raw

PATCH 1/1 mfd: altera-a10sr: Make altr_a10sr_regmap_config static const

It's only used in this driver and never get modified, make it static const.

---
 drivers/mfd/altera-a10sr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mfd/altera-a10sr.c +1 -1
index c05aa4f..40ed65e 100644
@@ -94,7 +94,7 @@ static bool altr_a10sr_reg_volatile(struct device *dev, unsigned int reg)
 	}
 }
 
-const struct regmap_config altr_a10sr_regmap_config = {
+static const struct regmap_config altr_a10sr_regmap_config = {
 	.reg_bits = 8,
 	.val_bits = 8,
 
Signature · 1 line
2.7.4
Reviewed-by on v1 1/1
#1 lore raw
Quoted 13 lines · Axel Lin

It's only used in this driver and never get modified, make it static const.

---
 drivers/mfd/altera-a10sr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mfd/altera-a10sr.c +0 -0
index c05aa4f..40ed65e 100644

drivers/mfd/altera-a10sr.c static bool altr_a10sr_reg_volatile(struct device *dev, unsigned int reg) · line 100

Quoted 8 lines
drivers/mfd/altera-a10sr.c +1 -1
@@ -94,7 +94,7 @@ static bool altr_a10sr_reg_volatile(struct device *dev, unsigned int reg)
 	}
 }
 
-const struct regmap_config altr_a10sr_regmap_config = {
+static const struct regmap_config altr_a10sr_regmap_config = {
 	.reg_bits = 8,
 	.val_bits = 8,
 
Applied
#2 lore raw
In reply to Axel Lin
Quoted 6 lines · Axel Lin

It's only used in this driver and never get modified, make it static const.

---
 drivers/mfd/altera-a10sr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Applied, thanks.

Quoted 13 lines
drivers/mfd/altera-a10sr.c +1 -1
index c05aa4f..40ed65e 100644
@@ -94,7 +94,7 @@ static bool altr_a10sr_reg_volatile(struct device *dev, unsigned int reg)
 	}
 }
 
-const struct regmap_config altr_a10sr_regmap_config = {
+static const struct regmap_config altr_a10sr_regmap_config = {
 	.reg_bits = 8,
 	.val_bits = 8,
 
Signature · 4 lines
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog