OSDN Git Service

ASoC: wm8974: set cache type for regmap
authorMans Rullgard <mans@mansr.com>
Fri, 11 Dec 2015 11:27:08 +0000 (11:27 +0000)
committerMark Brown <broonie@kernel.org>
Sat, 12 Dec 2015 22:22:06 +0000 (22:22 +0000)
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>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
sound/soc/codecs/wm8974.c

index 0a60677..4c29bd2 100644 (file)
@@ -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)