diff options
author | Krzysztof Kozlowski <k.kozlowski@samsung.com> | 2015-01-05 04:01:32 -0500 |
---|---|---|
committer | Lee Jones <lee.jones@linaro.org> | 2015-01-22 11:03:48 -0500 |
commit | d842b61ba9e63b77830f24f1bfdcc102f5628167 (patch) | |
tree | e17c0b5eb9eaaf9c4c5b5fc02f390346239a1aa8 /drivers/mfd/twl-core.c | |
parent | af0a837de60c548032f9b364d75fadf56e3a1b09 (diff) |
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>
Diffstat (limited to 'drivers/mfd/twl-core.c')
-rw-r--r-- | drivers/mfd/twl-core.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/mfd/twl-core.c b/drivers/mfd/twl-core.c index db11b4f40611..489674a2497e 100644 --- a/drivers/mfd/twl-core.c +++ b/drivers/mfd/twl-core.c | |||
@@ -207,7 +207,7 @@ static struct twl_mapping twl4030_map[] = { | |||
207 | { 2, TWL5031_BASEADD_INTERRUPTS }, | 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 | /* Audio Registers */ | 211 | /* Audio Registers */ |
212 | { 0x01, 0x00}, /* CODEC_MODE */ | 212 | { 0x01, 0x00}, /* CODEC_MODE */ |
213 | { 0x02, 0x00}, /* OPTION */ | 213 | { 0x02, 0x00}, /* OPTION */ |
@@ -306,7 +306,7 @@ static const struct regmap_access_table twl4030_49_volatile_table = { | |||
306 | .n_yes_ranges = ARRAY_SIZE(twl4030_49_volatile_ranges), | 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 | /* Address 0x48 */ | 311 | /* Address 0x48 */ |
312 | .reg_bits = 8, | 312 | .reg_bits = 8, |
@@ -369,7 +369,7 @@ static struct twl_mapping twl6030_map[] = { | |||
369 | { 1, TWL6030_BASEADD_GASGAUGE }, | 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 | /* Address 0x48 */ | 374 | /* Address 0x48 */ |
375 | .reg_bits = 8, | 375 | .reg_bits = 8, |
@@ -1087,7 +1087,7 @@ twl_probe(struct i2c_client *client, const struct i2c_device_id *id) | |||
1087 | struct twl4030_platform_data *pdata = dev_get_platdata(&client->dev); | 1087 | struct twl4030_platform_data *pdata = dev_get_platdata(&client->dev); |
1088 | struct device_node *node = client->dev.of_node; | 1088 | struct device_node *node = client->dev.of_node; |
1089 | struct platform_device *pdev; | 1089 | struct platform_device *pdev; |
1090 | struct regmap_config *twl_regmap_config; | 1090 | const struct regmap_config *twl_regmap_config; |
1091 | int irq_base = 0; | 1091 | int irq_base = 0; |
1092 | int status; | 1092 | int status; |
1093 | unsigned i, num_slaves; | 1093 | unsigned i, num_slaves; |