From: Mans Rullgard Date: Fri, 11 Dec 2015 11:27:08 +0000 (+0000) Subject: ASoC: wm8974: set cache type for regmap X-Git-Tag: v4.1.12-92~150^2~374 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=9394945e1801493bd6d984da8809badf1e956eb4;p=users%2Fjedix%2Flinux-maple.git ASoC: wm8974: set cache type for regmap Orabug: 23330537 commit 1ea5998afe903384ddc16391d4c023cd4c867bea upstream. 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 Acked-by: Charles Keepax Signed-off-by: Mark Brown Signed-off-by: Greg Kroah-Hartman (cherry picked from commit 1fce19176555fdad16a9933965f36e514514d092) Signed-off-by: Dan Duval --- diff --git a/sound/soc/codecs/wm8974.c b/sound/soc/codecs/wm8974.c index ff0e4646b934c..88317c1b7f96c 100644 --- a/sound/soc/codecs/wm8974.c +++ b/sound/soc/codecs/wm8974.c @@ -575,6 +575,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)