diff mbox

ASoC: wm8974: set cache type for regmap

Message ID 1449833229-3301-1-git-send-email-mans@mansr.com (mailing list archive)
State Accepted
Commit 1ea5998afe903384ddc16391d4c023cd4c867bea
Headers show

Commit Message

Måns Rullgård Dec. 11, 2015, 11:27 a.m. UTC
Attempting to use this codec driver triggers a BUG() in regcache_sync()
since no cache type is set.  The register map of this device is fairly
small and has few holes so a flat cache is suitable.

Signed-off-by: Mans Rullgard <mans@mansr.com>
---
 sound/soc/codecs/wm8974.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Charles Keepax Dec. 11, 2015, 12:54 p.m. UTC | #1
On Fri, Dec 11, 2015 at 11:27:08AM +0000, Mans Rullgard wrote:
> Attempting to use this codec driver triggers a BUG() in regcache_sync()
> since no cache type is set.  The register map of this device is fairly
> small and has few holes so a flat cache is suitable.
> 
> Signed-off-by: Mans Rullgard <mans@mansr.com>
> ---

Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>

Thanks,
Charles
diff mbox

Patch

diff --git a/sound/soc/codecs/wm8974.c b/sound/soc/codecs/wm8974.c
index 45ba828..c284c7b 100644
--- a/sound/soc/codecs/wm8974.c
+++ b/sound/soc/codecs/wm8974.c
@@ -574,6 +574,7 @@  static const struct regmap_config wm8974_regmap = {
 	.max_register = WM8974_MONOMIX,
 	.reg_defaults = wm8974_reg_defaults,
 	.num_reg_defaults = ARRAY_SIZE(wm8974_reg_defaults),
+	.cache_type = REGCACHE_FLAT,
 };
 
 static int wm8974_probe(struct snd_soc_codec *codec)