From: Mark Brown Date: Fri, 3 Jul 2009 09:33:39 +0000 (+0100) Subject: ASoC: Fix register cache initialisation for WM8753 X-Git-Tag: v2.6.30.4~45 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1c517c243cc762ac9d926ff5afd042d17bcf063b;p=thirdparty%2Fkernel%2Fstable.git ASoC: Fix register cache initialisation for WM8753 commit 1df892cba45f9856d369a6a317ad2d1e44bca423 upstream. The wrong register cache variable was being used to provide the size for the memcpy(), resulting in a copy of only a void * of data. Reported-by: Lars-Peter Clausen Signed-off-by: Mark Brown Signed-off-by: Greg Kroah-Hartman --- diff --git a/sound/soc/codecs/wm8753.c b/sound/soc/codecs/wm8753.c index a6e8f3f7f052e..40d411693355d 100644 --- a/sound/soc/codecs/wm8753.c +++ b/sound/soc/codecs/wm8753.c @@ -1664,7 +1664,7 @@ static int wm8753_register(struct wm8753_priv *wm8753) codec->reg_cache = &wm8753->reg_cache; codec->private_data = wm8753; - memcpy(codec->reg_cache, wm8753_reg, sizeof(codec->reg_cache)); + memcpy(codec->reg_cache, wm8753_reg, sizeof(wm8753->reg_cache)); INIT_DELAYED_WORK(&codec->delayed_work, wm8753_work); ret = wm8753_reset(codec);