diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2014-11-08 18:38:06 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2014-11-09 12:06:30 +0300 |
commit | 6cc79294efefde2593eaf72effebc8b1cc71d5ac (patch) | |
tree | 5b71bb1e89c92fabb600a3b915039883ecb8c8de /sound/soc/soc-cache.c | |
parent | f114040e3ea6e07372334ade75d1ee0775c355e1 (diff) | |
download | linux-6cc79294efefde2593eaf72effebc8b1cc71d5ac.tar.xz |
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>
Diffstat (limited to 'sound/soc/soc-cache.c')
-rw-r--r-- | sound/soc/soc-cache.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sound/soc/soc-cache.c b/sound/soc/soc-cache.c index a9f82b5aba9d..6dab81799b9a 100644 --- a/sound/soc/soc-cache.c +++ b/sound/soc/soc-cache.c @@ -187,6 +187,9 @@ int snd_soc_cache_sync(struct snd_soc_codec *codec) const char *name = "flat"; int ret; + if (codec->component.regmap) + return regcache_sync(codec->component.regmap); + if (!codec->cache_sync) return 0; |