diff options
-rw-r--r-- | drivers/base/regmap/regmap.c | 13 |
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); | |||
659 | * new cache. This can be used to restore the cache to defaults or to | 659 | * new cache. This can be used to restore the cache to defaults or to |
660 | * update the cache configuration to reflect runtime discovery of the | 660 | * update the cache configuration to reflect runtime discovery of the |
661 | * hardware. | 661 | * hardware. |
662 | * | ||
663 | * No explicit locking is done here, the user needs to ensure that | ||
664 | * this function will not race with other calls to regmap. | ||
662 | */ | 665 | */ |
663 | int regmap_reinit_cache(struct regmap *map, const struct regmap_config *config) | 666 | int regmap_reinit_cache(struct regmap *map, const struct regmap_config *config) |
664 | { | 667 | { |
665 | int ret; | ||
666 | |||
667 | map->lock(map); | ||
668 | |||
669 | regcache_exit(map); | 668 | regcache_exit(map); |
670 | regmap_debugfs_exit(map); | 669 | regmap_debugfs_exit(map); |
671 | 670 | ||
@@ -681,11 +680,7 @@ int regmap_reinit_cache(struct regmap *map, const struct regmap_config *config) | |||
681 | map->cache_bypass = false; | 680 | map->cache_bypass = false; |
682 | map->cache_only = false; | 681 | map->cache_only = false; |
683 | 682 | ||
684 | ret = regcache_init(map, config); | 683 | return regcache_init(map, config); |
685 | |||
686 | map->unlock(map); | ||
687 | |||
688 | return ret; | ||
689 | } | 684 | } |
690 | EXPORT_SYMBOL_GPL(regmap_reinit_cache); | 685 | EXPORT_SYMBOL_GPL(regmap_reinit_cache); |
691 | 686 | ||