Re: [PATCH] ASoC: Fix wm8753 register cache size and initialization

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Lars-Peter Clausen <lars@...>
Cc: <openmoko-kernel@...>
Date: Friday, July 3, 2009 - 6:19 am

On Fri, Jul 03, 2009 at 01:04:16AM +0200, Lars-Peter Clausen wrote:

As discussed in reply to your posting on lkml only 62 of the registers
are cached so the adjustments in cache size would appear to be
incorrect.


I've published a fix for this one, see below.


No, that predates the change in the driver by a very long time.

commit 1df892cba45f9856d369a6a317ad2d1e44bca423
Author: Mark Brown <broonie@opensource.wolfsonmicro.com>
Date:   Fri Jul 3 10:33:39 2009 +0100

    ASoC: Fix register cache initialisation for WM8753
    
    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 <lars@metafoo.de>
    Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
    Cc: stable@kernel.org

diff --git a/sound/soc/codecs/wm8753.c b/sound/soc/codecs/wm8753.c
index d28eeac..e06b0cf 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);
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] ASoC: Fix wm8753 register cache size and initializat..., Lars-Peter Clausen, (Thu Jul 2, 7:04 pm)
Re: [PATCH] ASoC: Fix wm8753 register cache size and initial..., Mark Brown, (Fri Jul 3, 6:19 am)
Re: [PATCH] ASoC: Fix wm8753 register cache size and initial..., Lars-Peter Clausen, (Fri Jul 3, 7:07 am)