Skip to content

Commit

Permalink
regmap: Fix lock used for regcache_cache_only()
Browse files Browse the repository at this point in the history
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
  • Loading branch information
Mark Brown committed Sep 29, 2011
1 parent 38f6916 commit 2cd148f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/base/regmap/regcache.c
Original file line number Diff line number Diff line change
Expand Up @@ -273,9 +273,9 @@ EXPORT_SYMBOL_GPL(regcache_sync);
*/
void regcache_cache_only(struct regmap *map, bool enable)
{
mutex_lock(&map->sync_lock);
mutex_lock(&map->lock);
map->cache_only = enable;
mutex_unlock(&map->sync_lock);
mutex_unlock(&map->lock);
}
EXPORT_SYMBOL_GPL(regcache_cache_only);

Expand Down

0 comments on commit 2cd148f

Please sign in to comment.