diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2008-06-11 08:47:07 -0400 |
---|---|---|
committer | Jaroslav Kysela <perex@perex.cz> | 2008-06-13 10:47:46 -0400 |
commit | 8ddd440768e04e0c158c2bfa6178928e1f1eef3e (patch) | |
tree | 262d5d584301f92bb0a6a984b784e278fd75f0dd /sound/soc/codecs/uda1380.c | |
parent | d751b233bb8568f1de1ccbe3824ca69090326251 (diff) |
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: 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>
Diffstat (limited to 'sound/soc/codecs/uda1380.c')
-rw-r--r-- | sound/soc/codecs/uda1380.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/soc/codecs/uda1380.c b/sound/soc/codecs/uda1380.c index cb50486201f1..6d5335b14d51 100644 --- a/sound/soc/codecs/uda1380.c +++ b/sound/soc/codecs/uda1380.c | |||
@@ -655,8 +655,8 @@ static int uda1380_init(struct snd_soc_device *socdev, int dac_clk) | |||
655 | GFP_KERNEL); | 655 | GFP_KERNEL); |
656 | if (codec->reg_cache == NULL) | 656 | if (codec->reg_cache == NULL) |
657 | return -ENOMEM; | 657 | return -ENOMEM; |
658 | codec->reg_cache_size = sizeof(uda1380_reg); | 658 | codec->reg_cache_size = ARRAY_SIZE(uda1380_reg); |
659 | codec->reg_cache_step = 2; | 659 | codec->reg_cache_step = 1; |
660 | uda1380_reset(codec); | 660 | uda1380_reset(codec); |
661 | 661 | ||
662 | /* register pcms */ | 662 | /* register pcms */ |