Skip to content

Commit

Permalink
ALSA: ASoC: Fix register cache size for UDA1380
Browse files Browse the repository at this point in the history
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: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Philipp Zabel <philipp.zabel@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
  • Loading branch information
Mark Brown authored and Jaroslav Kysela committed Jun 13, 2008
1 parent d751b23 commit 8ddd440
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sound/soc/codecs/uda1380.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit 8ddd440

Please sign in to comment.