Skip to content

Commit ec8a365

Browse files
Dimitris Papastamosbroonie
authored andcommitted
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: Dimitris Papastamos <dp@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
1 parent a40c282 commit ec8a365

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎drivers/base/regmap/regcache.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,9 +241,9 @@ int regcache_sync(struct regmap *map)
241241
ret = regcache_read(map, i, &val);
242242
if (ret < 0)
243243
goto out;
244-
regcache_cache_bypass(map, true);
244+
map->cache_bypass = 1;
245245
ret = regmap_write(map, i, val);
246-
regcache_cache_bypass(map, false);
246+
map->cache_bypass = 0;
247247
if (ret < 0)
248248
goto out;
249249
dev_dbg(map->dev, "Synced register %#x, value %#x\n",

0 commit comments

Comments
 (0)