From fe2d685f0712bbc7d8c5485039eeb9b60caef0cc Mon Sep 17 00:00:00 2001 From: Peter Ujfalusi Date: Fri, 29 May 2009 09:22:37 +0300 Subject: [PATCH] --- yaml --- r: 148318 b: refs/heads/master c: 16a30fbb0d3aa4ee829a2dd3d0e314e2b5ae96a9 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/sound/soc/codecs/twl4030.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 0c0f63aaa374..690b7db01877 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 203350c1a8e23adf17fd9a96d8bfc7adf63c1ff6 +refs/heads/master: 16a30fbb0d3aa4ee829a2dd3d0e314e2b5ae96a9 diff --git a/trunk/sound/soc/codecs/twl4030.c b/trunk/sound/soc/codecs/twl4030.c index 63ebd176fbe4..df474a5dd357 100644 --- a/trunk/sound/soc/codecs/twl4030.c +++ b/trunk/sound/soc/codecs/twl4030.c @@ -145,7 +145,6 @@ struct twl4030_priv { static inline unsigned int twl4030_read_reg_cache(struct snd_soc_codec *codec, unsigned int reg) { - u8 *cache = codec->reg_cache; if (reg >= TWL4030_CACHEREGNUM) return -EIO; @@ -204,6 +203,7 @@ static void twl4030_codec_enable(struct snd_soc_codec *codec, int enable) static void twl4030_init_chip(struct snd_soc_codec *codec) { + u8 *cache = codec->reg_cache; int i; /* clear CODECPDZ prior to setting register defaults */ @@ -211,7 +211,7 @@ static void twl4030_init_chip(struct snd_soc_codec *codec) /* set all audio section registers to reasonable defaults */ for (i = TWL4030_REG_OPTION; i <= TWL4030_REG_MISC_SET_2; i++) - twl4030_write(codec, i, twl4030_reg[i]); + twl4030_write(codec, i, cache[i]); }