ASoC: Fix reg_cache_size for stac9766
authorAxel Lin <axel.lin@gmail.com>
Mon, 5 Dec 2011 02:06:04 +0000 (10:06 +0800)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Mon, 5 Dec 2011 13:30:39 +0000 (13:30 +0000)
reg_cache_size is supposed to be the number of elements in the register cache,
not the size in bytes.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
sound/soc/codecs/stac9766.c

index e34969cdc0e8d0db0a2e90b3839371b781e6f617..cc0566c22ec12ecfcf3f67d486b6330fea448f47 100644 (file)
@@ -379,7 +379,7 @@ static struct snd_soc_codec_driver soc_codec_dev_stac9766 = {
        .remove = stac9766_codec_remove,
        .suspend = stac9766_codec_suspend,
        .resume = stac9766_codec_resume,
-       .reg_cache_size = sizeof(stac9766_reg),
+       .reg_cache_size = ARRAY_SIZE(stac9766_reg),
        .reg_word_size = sizeof(u16),
        .reg_cache_step = 2,
        .reg_cache_default = stac9766_reg,