summaryrefslogtreecommitdiff
path: root/drivers/base/regmap/regmap.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-10-01 19:58:06 +0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-10-01 19:58:06 +0400
commitb34e5f55a1e6667a800280fc4045632c139b4e4e (patch)
treec7664dd3fe3a37f89394ae926c83fb859263b765 /drivers/base/regmap/regmap.c
parente151960a23cc99e310f90adad7ee592821a77434 (diff)
parent613dac31a612f9417bd1b1438acebbc3b8f9073e (diff)
downloadlinux-b34e5f55a1e6667a800280fc4045632c139b4e4e.tar.xz
Merge tag 'regmap-3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap
Pull regmap updates from Mark Brown: "A quiet release for the regmap core, essentially all the activity is in the shared interrupt controller which is being more and more widely used and has been enhanced to support a wider range of masking types and wake handling methods, plus integration with runtime PM for devices making aggressive use of that." * tag 'regmap-3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap: regmap: no need primary handler for nested irq regmap: irq: Add mask invert flag for enable register mfd: wm8994: Flag the interrupt block as requiring runtime PM be enabled regmap: irq: Enable devices for runtime PM while handling interrupts regmap: irq: initialize all irqs to wake disabled regmap: set MASK_ON_SUSPEND/SKIP_SET_WAKE if no wake_base regmap: name irq_chip based on regmap_irq_chip's name regmap: store irq_chip inside regmap_irq_chip_data regmap: irq: Only update mask bits when doing initial mask regmap: fix some error messages to take account of irq_reg_stride regmap: Don't lock in regmap_reinit_cache()
Diffstat (limited to 'drivers/base/regmap/regmap.c')
-rw-r--r--drivers/base/regmap/regmap.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/drivers/base/regmap/regmap.c b/drivers/base/regmap/regmap.c
index c241ae2f2f10..52069d29ff12 100644
--- a/drivers/base/regmap/regmap.c
+++ b/drivers/base/regmap/regmap.c
@@ -659,13 +659,12 @@ EXPORT_SYMBOL_GPL(devm_regmap_init);
* new cache. This can be used to restore the cache to defaults or to
* update the cache configuration to reflect runtime discovery of the
* hardware.
+ *
+ * No explicit locking is done here, the user needs to ensure that
+ * this function will not race with other calls to regmap.
*/
int regmap_reinit_cache(struct regmap *map, const struct regmap_config *config)
{
- int ret;
-
- map->lock(map);
-
regcache_exit(map);
regmap_debugfs_exit(map);
@@ -681,11 +680,7 @@ int regmap_reinit_cache(struct regmap *map, const struct regmap_config *config)
map->cache_bypass = false;
map->cache_only = false;
- ret = regcache_init(map, config);
-
- map->unlock(map);
-
- return ret;
+ return regcache_init(map, config);
}
EXPORT_SYMBOL_GPL(regmap_reinit_cache);