regmap: Fix lock used for regcache_cache_only()
authorMark Brown <broonie@opensource.wolfsonmicro.com>
Thu, 29 Sep 2011 09:40:55 +0000 (10:40 +0100)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Thu, 29 Sep 2011 09:40:55 +0000 (10:40 +0100)
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
drivers/base/regmap/regcache.c

index 744ed145bfa48efd833f6da863d556ecc3ef1226..4dfab4107bfe84b16c4cb6c5fa64e5987f104951 100644 (file)
@@ -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);