Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ec8a365f authored by Dimitris Papastamos's avatar Dimitris Papastamos Committed by Mark Brown
Browse files

regmap: Modify map->cache_bypass directly



In preperation for the upcoming patches, modify map->cache_bypass
directly.  The helper functions will grab an exclusive lock.  Because
we'll have acquired the same lock we need to avoid a deadlock.

Signed-off-by: default avatarDimitris Papastamos <dp@opensource.wolfsonmicro.com>
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent a40c2823
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -241,9 +241,9 @@ int regcache_sync(struct regmap *map)
			ret = regcache_read(map, i, &val);
			ret = regcache_read(map, i, &val);
			if (ret < 0)
			if (ret < 0)
				goto out;
				goto out;
			regcache_cache_bypass(map, true);
			map->cache_bypass = 1;
			ret = regmap_write(map, i, val);
			ret = regmap_write(map, i, val);
			regcache_cache_bypass(map, false);
			map->cache_bypass = 0;
			if (ret < 0)
			if (ret < 0)
				goto out;
				goto out;
			dev_dbg(map->dev, "Synced register %#x, value %#x\n",
			dev_dbg(map->dev, "Synced register %#x, value %#x\n",