aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/regmap.h
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2011-11-16 10:28:17 -0500
committerMark Brown <broonie@opensource.wolfsonmicro.com>2011-11-16 12:34:53 -0500
commit720e4616e8fd85284ef1addd8b8d93d8415e8dbc (patch)
tree7e168b437b5b4ecb1154186e3234fbdbf9c52b92 /include/linux/regmap.h
parente5e3b8abeda1cf45f5a079458dbc267952694c7a (diff)
regmap: Make reg_config reg_defaults const
The reg_defaults field usually points to a static per driver array, which should not be modified. Make requirement this explicit by making reg_defaults const. To allow this the regcache_init code needs some minor changes. Previoulsy the reg_config was not available in regcache_init and regmap->reg_defaults was used to pass the default register set to regcache_init. Now that the reg_config is available we can work on it directly. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'include/linux/regmap.h')
-rw-r--r--include/linux/regmap.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/regmap.h b/include/linux/regmap.h
index 1e4ec2b6c2ea..458f15f4c37c 100644
--- a/include/linux/regmap.h
+++ b/include/linux/regmap.h
@@ -83,7 +83,7 @@ struct regmap_config {
83 bool (*precious_reg)(struct device *dev, unsigned int reg); 83 bool (*precious_reg)(struct device *dev, unsigned int reg);
84 84
85 unsigned int max_register; 85 unsigned int max_register;
86 struct reg_default *reg_defaults; 86 const struct reg_default *reg_defaults;
87 unsigned int num_reg_defaults; 87 unsigned int num_reg_defaults;
88 enum regcache_type cache_type; 88 enum regcache_type cache_type;
89 const void *reg_defaults_raw; 89 const void *reg_defaults_raw;