Commit d842b61ba9e63b77830f24f1bfdcc102f5628167

Authored by Krzysztof Kozlowski
Committed by Lee Jones
1 parent af0a837de6

mfd: twl-core: Constify struct regmap_config and reg_default array

The regmap_config struct may be const because it is not modified by the
driver and regmap_init() accepts pointer to const. Make array of
struct reg_default const as well.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>

Showing 1 changed file with 4 additions and 4 deletions Side-by-side Diff

drivers/mfd/twl-core.c
... ... @@ -207,7 +207,7 @@
207 207 { 2, TWL5031_BASEADD_INTERRUPTS },
208 208 };
209 209  
210   -static struct reg_default twl4030_49_defaults[] = {
  210 +static const struct reg_default twl4030_49_defaults[] = {
211 211 /* Audio Registers */
212 212 { 0x01, 0x00}, /* CODEC_MODE */
213 213 { 0x02, 0x00}, /* OPTION */
... ... @@ -306,7 +306,7 @@
306 306 .n_yes_ranges = ARRAY_SIZE(twl4030_49_volatile_ranges),
307 307 };
308 308  
309   -static struct regmap_config twl4030_regmap_config[4] = {
  309 +static const struct regmap_config twl4030_regmap_config[4] = {
310 310 {
311 311 /* Address 0x48 */
312 312 .reg_bits = 8,
... ... @@ -369,7 +369,7 @@
369 369 { 1, TWL6030_BASEADD_GASGAUGE },
370 370 };
371 371  
372   -static struct regmap_config twl6030_regmap_config[3] = {
  372 +static const struct regmap_config twl6030_regmap_config[3] = {
373 373 {
374 374 /* Address 0x48 */
375 375 .reg_bits = 8,
... ... @@ -1087,7 +1087,7 @@
1087 1087 struct twl4030_platform_data *pdata = dev_get_platdata(&client->dev);
1088 1088 struct device_node *node = client->dev.of_node;
1089 1089 struct platform_device *pdev;
1090   - struct regmap_config *twl_regmap_config;
  1090 + const struct regmap_config *twl_regmap_config;
1091 1091 int irq_base = 0;
1092 1092 int status;
1093 1093 unsigned i, num_slaves;