Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ASoC: Forward calls to snd_soc_cache_sync() to regcache_sync()

For convenience for drivers that do not want to keep their own pointer to
regmap struct around forward calls to snd_soc_cache_sync() to
regcache_sync() if the driver is using regmap. This is similar to what we do
for snd_soc_read()/snd_soc_write().

This patch also fixes drivers which already have been converted to regmap,
but still use snd_soc_cache_sync() for trying to the sync the cache.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Lars-Peter Clausen and committed by
Mark Brown
6cc79294 f114040e

+3
+3
sound/soc/soc-cache.c
··· 187 187 const char *name = "flat"; 188 188 int ret; 189 189 190 + if (codec->component.regmap) 191 + return regcache_sync(codec->component.regmap); 192 + 190 193 if (!codec->cache_sync) 191 194 return 0; 192 195