aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJulia Lawall <julia@diku.dk>2009-12-13 06:43:15 -0500
committerMark Brown <broonie@opensource.wolfsonmicro.com>2009-12-14 06:37:57 -0500
commitbc2580061e42c323d7777029f01318f395edac0d (patch)
tree2e266d1159559d02b5d8d7e4d3c9539aac051d28
parent761c9d45d14e0afa3c0b8eb84b4075602e50533b (diff)
ASoC: Correct code taking the size of a pointer
sizeof(codec->reg_cache) is just the size of the pointer. Elsewhere in the file, codec->reg_cache is used with sizeof(wm8900_reg_defaults), so the code is changed to do the same here. A simplified version of the semantic patch that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ expression *x; expression f; type T; @@ *f(...,(T)x,...) // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
-rw-r--r--sound/soc/codecs/wm8900.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/soc/codecs/wm8900.c b/sound/soc/codecs/wm8900.c
index c9438dd62df3..dbc368c08263 100644
--- a/sound/soc/codecs/wm8900.c
+++ b/sound/soc/codecs/wm8900.c
@@ -199,7 +199,7 @@ static void wm8900_reset(struct snd_soc_codec *codec)
199 snd_soc_write(codec, WM8900_REG_RESET, 0); 199 snd_soc_write(codec, WM8900_REG_RESET, 0);
200 200
201 memcpy(codec->reg_cache, wm8900_reg_defaults, 201 memcpy(codec->reg_cache, wm8900_reg_defaults,
202 sizeof(codec->reg_cache)); 202 sizeof(wm8900_reg_defaults));
203} 203}
204 204
205static int wm8900_hp_event(struct snd_soc_dapm_widget *w, 205static int wm8900_hp_event(struct snd_soc_dapm_widget *w,