Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9f8cbae4 authored by Mark Brown's avatar Mark Brown
Browse files

ASoC: wm8985 Don't directly reference the cache data structure



In preparation for conversion to regmap.

Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent 8b71d441
Loading
Loading
Loading
Loading
+4 −5
Original line number Original line Diff line number Diff line
@@ -946,7 +946,6 @@ static int wm8985_probe(struct snd_soc_codec *codec)
	size_t i;
	size_t i;
	struct wm8985_priv *wm8985;
	struct wm8985_priv *wm8985;
	int ret;
	int ret;
	u16 *cache;


	wm8985 = snd_soc_codec_get_drvdata(codec);
	wm8985 = snd_soc_codec_get_drvdata(codec);


@@ -979,13 +978,13 @@ static int wm8985_probe(struct snd_soc_codec *codec)
		goto err_reg_enable;
		goto err_reg_enable;
	}
	}


	cache = codec->reg_cache;
	/* latch volume update bits */
	/* latch volume update bits */
	for (i = 0; i < ARRAY_SIZE(volume_update_regs); ++i)
	for (i = 0; i < ARRAY_SIZE(volume_update_regs); ++i)
		cache[volume_update_regs[i]] |= 0x100;
		snd_soc_update_bits(codec, volume_update_regs[i],
				    0x100, 0x100);
	/* enable BIASCUT */
	/* enable BIASCUT */
	cache[WM8985_BIAS_CTRL] |= WM8985_BIASCUT;
	snd_soc_update_bits(codec, WM8985_BIAS_CTRL, WM8985_BIASCUT,
	codec->cache_sync = 1;
			    WM8985_BIASCUT);


	wm8985_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
	wm8985_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
	return 0;
	return 0;