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

Commit 8ddd4407 authored by Mark Brown's avatar Mark Brown Committed by Jaroslav Kysela
Browse files

ALSA: ASoC: Fix register cache size for UDA1380



The register cache size is used by the codec_reg sysfs file which works in
terms of the register cache access functions rather than in terms of raw
access to the cache so the size specified needs to be in terms of the
number of elements.

Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Philipp Zabel <philipp.zabel@gmail.com>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
Signed-off-by: default avatarJaroslav Kysela <perex@perex.cz>
parent d751b233
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -655,8 +655,8 @@ static int uda1380_init(struct snd_soc_device *socdev, int dac_clk)
				   GFP_KERNEL);
	if (codec->reg_cache == NULL)
		return -ENOMEM;
	codec->reg_cache_size = sizeof(uda1380_reg);
	codec->reg_cache_step = 2;
	codec->reg_cache_size = ARRAY_SIZE(uda1380_reg);
	codec->reg_cache_step = 1;
	uda1380_reset(codec);

	/* register pcms */