regmap: Grab the lock in regcache_cache_only()
Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
This commit is contained in:
committed by
Mark Brown
parent
ec8a365fe6
commit
38f6916976
@@ -273,7 +273,9 @@ EXPORT_SYMBOL_GPL(regcache_sync);
|
|||||||
*/
|
*/
|
||||||
void regcache_cache_only(struct regmap *map, bool enable)
|
void regcache_cache_only(struct regmap *map, bool enable)
|
||||||
{
|
{
|
||||||
|
mutex_lock(&map->sync_lock);
|
||||||
map->cache_only = enable;
|
map->cache_only = enable;
|
||||||
|
mutex_unlock(&map->sync_lock);
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(regcache_cache_only);
|
EXPORT_SYMBOL_GPL(regcache_cache_only);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user