]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
ASoC: Fix incorrect register cache size configuration
authorDimitris Papastamos <dp@opensource.wolfsonmicro.com>
Fri, 10 Sep 2010 17:14:56 +0000 (18:14 +0100)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Fri, 10 Sep 2010 21:21:23 +0000 (22:21 +0100)
The reg_cache_size is the number of elements in the register cache,
not the size of the cache itself. This is not a problem if the size
of each element of the cache is 1 byte but it matters in any other
case.

Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
17 files changed:
sound/soc/codecs/wm8580.c
sound/soc/codecs/wm8711.c
sound/soc/codecs/wm8728.c
sound/soc/codecs/wm8731.c
sound/soc/codecs/wm8741.c
sound/soc/codecs/wm8750.c
sound/soc/codecs/wm8753.c
sound/soc/codecs/wm8776.c
sound/soc/codecs/wm8900.c
sound/soc/codecs/wm8940.c
sound/soc/codecs/wm8961.c
sound/soc/codecs/wm8988.c
sound/soc/codecs/wm8993.c
sound/soc/codecs/wm9081.c
sound/soc/codecs/wm9705.c
sound/soc/codecs/wm9712.c
sound/soc/codecs/wm9713.c

index 910c62a3f5944b210bca016c0f0cb16a25f07bd2..ad5987e6c9ca98d2cb5291d3546d257e377185f2 100644 (file)
@@ -907,7 +907,7 @@ static struct snd_soc_codec_driver soc_codec_dev_wm8580 = {
        .probe =        wm8580_probe,
        .remove =       wm8580_remove,
        .set_bias_level = wm8580_set_bias_level,
-       .reg_cache_size = sizeof(wm8580_reg),
+       .reg_cache_size = ARRAY_SIZE(wm8580_reg),
        .reg_word_size = sizeof(u16),
        .reg_cache_default = &wm8580_reg,
 };
index f8d9c60e7fad06d65ca69ed28d68eb4d78393f56..52a923a7861e41aea9a7b89b46d3e91e20ceefd4 100644 (file)
@@ -418,7 +418,7 @@ static struct snd_soc_codec_driver soc_codec_dev_wm8711 = {
        .suspend =      wm8711_suspend,
        .resume =       wm8711_resume,
        .set_bias_level = wm8711_set_bias_level,
-       .reg_cache_size = sizeof(wm8711_reg),
+       .reg_cache_size = ARRAY_SIZE(wm8711_reg),
        .reg_word_size = sizeof(u16),
        .reg_cache_default = wm8711_reg,
 };
index 5e5a1625194c453841ecd2ce431064521595c8bf..32eba85b0a2cad6fd965b045eebf14dab4212b1a 100644 (file)
@@ -272,7 +272,7 @@ static struct snd_soc_codec_driver soc_codec_dev_wm8728 = {
        .suspend =      wm8728_suspend,
        .resume =       wm8728_resume,
        .set_bias_level = wm8728_set_bias_level,
-       .reg_cache_size = sizeof(wm8728_reg_defaults),
+       .reg_cache_size = ARRAY_SIZE(wm8728_reg_defaults),
        .reg_word_size = sizeof(u16),
        .reg_cache_default = wm8728_reg_defaults,
 };
index 56f540838745a0407d3f1611cbd50eac4b8377b8..28275014c73d1bd65167972c1684adf44a261d7e 100644 (file)
@@ -567,7 +567,7 @@ static struct snd_soc_codec_driver soc_codec_dev_wm8731 = {
        .suspend =      wm8731_suspend,
        .resume =       wm8731_resume,
        .set_bias_level = wm8731_set_bias_level,
-       .reg_cache_size = sizeof(wm8731_reg),
+       .reg_cache_size = ARRAY_SIZE(wm8731_reg),
        .reg_word_size = sizeof(u16),
        .reg_cache_default = wm8731_reg,
 };
index c8e7a264bbaee5c48cd5fa8e9b97cab07e03399c..90e31e9aa6f7c66346c8360a3c1ab900519e4a98 100644 (file)
@@ -453,7 +453,7 @@ static int wm8741_probe(struct snd_soc_codec *codec)
 static struct snd_soc_codec_driver soc_codec_dev_wm8741 = {
        .probe =        wm8741_probe,
        .resume =       wm8741_resume,
-       .reg_cache_size = sizeof(wm8741_reg_defaults),
+       .reg_cache_size = ARRAY_SIZE(wm8741_reg_defaults),
        .reg_word_size = sizeof(u16),
        .reg_cache_default = &wm8741_reg_defaults,
 };
index 92d4b2aef93b54a4d31af6e6f85cecd80bda4e9f..4d1ec9dc86ffbd06f7722aef0c3d217523ca5677 100644 (file)
@@ -747,7 +747,7 @@ static struct snd_soc_codec_driver soc_codec_dev_wm8750 = {
        .suspend =      wm8750_suspend,
        .resume =       wm8750_resume,
        .set_bias_level = wm8750_set_bias_level,
-       .reg_cache_size = sizeof(wm8750_reg),
+       .reg_cache_size = ARRAY_SIZE(wm8750_reg),
        .reg_word_size = sizeof(u16),
        .reg_cache_default = wm8750_reg,
 };
index 4a945d3edf25fe14eda18e065b9ff8fca5c13a60..0b0e3b3ebbbb81ab4fb8f8262d181e6b92a43d85 100644 (file)
@@ -1617,7 +1617,7 @@ static struct snd_soc_codec_driver soc_codec_dev_wm8753 = {
        .suspend =      wm8753_suspend,
        .resume =       wm8753_resume,
        .set_bias_level = wm8753_set_bias_level,
-       .reg_cache_size = sizeof(wm8753_reg),
+       .reg_cache_size = ARRAY_SIZE(wm8753_reg),
        .reg_word_size = sizeof(u16),
        .reg_cache_default = wm8753_reg,
 };
index 05d98dd26072407300a864cbb034b70b7d4c074d..c0b69179855a5e14ce2f6ba1acb8d9856f0d309b 100644 (file)
@@ -448,7 +448,7 @@ static struct snd_soc_codec_driver soc_codec_dev_wm8776 = {
        .suspend =      wm8776_suspend,
        .resume =       wm8776_resume,
        .set_bias_level = wm8776_set_bias_level,
-       .reg_cache_size = sizeof(wm8776_reg),
+       .reg_cache_size = ARRAY_SIZE(wm8776_reg),
        .reg_word_size = sizeof(u16),
        .reg_cache_default = wm8776_reg,
 };
index 1378aab5ca7562b6feaead8f87aff0c884c3d6aa..25c8ccdb6e8dc972f410684f24ab98ce1378a989 100644 (file)
@@ -1256,7 +1256,7 @@ static struct snd_soc_codec_driver soc_codec_dev_wm8900 = {
        .resume =       wm8900_resume,
        .set_bias_level = wm8900_set_bias_level,
        .volatile_register = wm8900_volatile_register,
-       .reg_cache_size = sizeof(wm8900_reg_defaults),
+       .reg_cache_size = ARRAY_SIZE(wm8900_reg_defaults),
        .reg_word_size = sizeof(u16),
        .reg_cache_default = wm8900_reg_defaults,
 };
index d28bf0dfdb1dd4ded519caa2943ef5dbd64cfc76..2cb16f895c4607c9d323ea3cbb9d8e31c4741cb1 100644 (file)
@@ -750,7 +750,7 @@ static struct snd_soc_codec_driver soc_codec_dev_wm8940 = {
        .suspend =      wm8940_suspend,
        .resume =       wm8940_resume,
        .set_bias_level = wm8940_set_bias_level,
-       .reg_cache_size = sizeof(wm8940_reg_defaults),
+       .reg_cache_size = ARRAY_SIZE(wm8940_reg_defaults),
        .reg_word_size = sizeof(u16),
        .reg_cache_default = wm8940_reg_defaults,
 };
index bfc6578ed060e874f75acbb25d0746033ae22b2a..4f326f6041042742255731ba078574b37a48a6f3 100644 (file)
@@ -1075,7 +1075,7 @@ static struct snd_soc_codec_driver soc_codec_dev_wm8961 = {
        .suspend =      wm8961_suspend,
        .resume =       wm8961_resume,
        .set_bias_level = wm8961_set_bias_level,
-       .reg_cache_size = sizeof(wm8961_reg_defaults),
+       .reg_cache_size = ARRAY_SIZE(wm8961_reg_defaults),
        .reg_word_size = sizeof(u16),
        .reg_cache_default = wm8961_reg_defaults,
        .volatile_register = wm8961_volatile_register,
index d070a58e4f8ed5b8ab73aa2c17be1967e24348d8..d08b1fe6c42c0b5d251297dac09a361257df7018 100644 (file)
@@ -809,7 +809,7 @@ static struct snd_soc_codec_driver soc_codec_dev_wm8988 = {
        .suspend =      wm8988_suspend,
        .resume =       wm8988_resume,
        .set_bias_level = wm8988_set_bias_level,
-       .reg_cache_size = sizeof(wm8988_reg),
+       .reg_cache_size = ARRAY_SIZE(wm8988_reg),
        .reg_word_size = sizeof(u16),
        .reg_cache_default = wm8988_reg,
 };
index a3fd6b935804406deb93c352ee5432ba899d9c57..589e3fa24734c721cce8e8fac6b3f9f72a50373b 100644 (file)
@@ -1586,7 +1586,7 @@ static struct snd_soc_codec_driver soc_codec_dev_wm8993 = {
        .suspend =      wm8993_suspend,
        .resume =       wm8993_resume,
        .set_bias_level = wm8993_set_bias_level,
-       .reg_cache_size = sizeof(wm8993_reg_defaults),
+       .reg_cache_size = ARRAY_SIZE(wm8993_reg_defaults),
        .reg_word_size = sizeof(u16),
        .reg_cache_default = wm8993_reg_defaults,
        .volatile_register = wm8993_volatile,
index 00249d5b67934b7a2dfba99a0176398b06e30f83..ecc7c37180c7ad2158f11b9de1579bde332cb44d 100644 (file)
@@ -1317,7 +1317,7 @@ static struct snd_soc_codec_driver soc_codec_dev_wm9081 = {
        .suspend =      wm9081_suspend,
        .resume =       wm9081_resume,
        .set_bias_level = wm9081_set_bias_level,
-       .reg_cache_size = sizeof(wm9081_reg_defaults),
+       .reg_cache_size = ARRAY_SIZE(wm9081_reg_defaults),
        .reg_word_size = sizeof(u16),
        .reg_cache_default = wm9081_reg_defaults,
        .volatile_register = wm9081_volatile_register,
index e4d8f5339c51e2ad5cc887fdcfe3e3d8a884be79..a144acda751cb7578954abe12310a0759bd1dec4 100644 (file)
@@ -385,7 +385,7 @@ static struct snd_soc_codec_driver soc_codec_dev_wm9705 = {
        .resume =       wm9705_soc_resume,
        .read = ac97_read,
        .write = ac97_write,
-       .reg_cache_size = sizeof(wm9705_reg),
+       .reg_cache_size = ARRAY_SIZE(wm9705_reg),
        .reg_word_size = sizeof(u16),
        .reg_cache_step = 2,
        .reg_cache_default = wm9705_reg,
index cebeb93c10c733f49181b804cdf6e924de550c11..d2f224d62744011dba3e2536edd05a87c17aa3b0 100644 (file)
@@ -674,7 +674,7 @@ static struct snd_soc_codec_driver soc_codec_dev_wm9712 = {
        .read = ac97_read,
        .write = ac97_write,
        .set_bias_level = wm9712_set_bias_level,
-       .reg_cache_size = sizeof(wm9712_reg),
+       .reg_cache_size = ARRAY_SIZE(wm9712_reg),
        .reg_word_size = sizeof(u16),
        .reg_cache_step = 2,
        .reg_cache_default = wm9712_reg,
index 463917e762b5d3453d443c9eda7c71db50acee94..7da13b07a53dfdbc5559e9eb21f140334145ed10 100644 (file)
@@ -1257,7 +1257,7 @@ static struct snd_soc_codec_driver soc_codec_dev_wm9713 = {
        .read = ac97_read,
        .write = ac97_write,
        .set_bias_level = wm9713_set_bias_level,
-       .reg_cache_size = sizeof(wm9713_reg),
+       .reg_cache_size = ARRAY_SIZE(wm9713_reg),
        .reg_word_size = sizeof(u16),
        .reg_cache_step = 2,
        .reg_cache_default = wm9713_reg,