summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2011-11-16 16:28:17 +0100
committerLokesh Pathak <lpathak@nvidia.com>2012-03-05 07:51:31 -0800
commite072692e9e2bc35439b34e3c070d5a56b0b5d43c (patch)
tree52d8c10c2adc79e67c03a84cdc61c720915bfd30 /include/linux
parentea00211110303e4966d39c9c998617e15e6a7fdb (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> (cherry picked from commit 720e4616e8fd85284ef1addd8b8d93d8415e8dbc) Change-Id: Ia56e48e948f6eaf23d0781bc8a7ea4c9d3761a98 Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: http://git-master/r/87560
Diffstat (limited to 'include/linux')
-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 2d78df9f1d82..164c9dc747a6 100644
--- a/include/linux/regmap.h
+++ b/include/linux/regmap.h
@@ -83,7 +83,7 @@ struct regmap_config {
bool (*precious_reg)(struct device *dev, unsigned int reg);
unsigned int max_register;
- struct reg_default *reg_defaults;
+ const struct reg_default *reg_defaults;
unsigned int num_reg_defaults;
enum regcache_type cache_type;
const void *reg_defaults_raw;