提交 6cc79294 编写于 作者: L Lars-Peter Clausen 提交者: Mark Brown

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: NLars-Peter Clausen <lars@metafoo.de>
Signed-off-by: NMark Brown <broonie@kernel.org>
上级 f114040e
...@@ -187,6 +187,9 @@ int snd_soc_cache_sync(struct snd_soc_codec *codec) ...@@ -187,6 +187,9 @@ int snd_soc_cache_sync(struct snd_soc_codec *codec)
const char *name = "flat"; const char *name = "flat";
int ret; int ret;
if (codec->component.regmap)
return regcache_sync(codec->component.regmap);
if (!codec->cache_sync) if (!codec->cache_sync)
return 0; return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册